Presumably your table listing all your tasks includes a field that can be used to identify which tasks have been completed. It could be a status field that says "completed" or some such or it could be a date field that records the date the task was completed.
Using DateCompleted as a date field to show which tasks are completed, your script might look like this:
Go To Layout [ TaskList (TaskList) ]
Enter Find Mode  //clear the pause check box
Set Field [TaskList::AccountName ; Get ( AccountName ) ]
Set Field [TaskList:: DateCompleted ; "=" ] //assumes field will be empty if task is not complete
Set Error Capture [on]
Perform Find 
Use File | File Options... to specify that this script run when the file is opened and it should do what you want.
Got it now, thanks.