Looking at the log, I would say the endif is executing very quickly. Rather the MessageModal is taking a long time to close. I'm not sure which is the correct way to interpret the log. Between END and the next START the script should not be processing either statement, but could be doing stuff in the background like checking for OnEvents.Noticing how on the sections in bold, although i take say 2 seconds to click the message modal OK button it takes 4 seconds for the endif to execute.
Your second MessageModal closes quickly:2/10/2009 15:07:07:188 - END: MessageModal>Message 4
2/10/2009 15:07:12:469 - START: EndIf
2/10/2009 15:07:12:500 - END: EndIf
Try commenting out the MessageModal>Message 4 statement or replace it with a WriteLn to see if a statement at this location still takes 2 or more seconds process.2/10/2009 15:07:13:859 - END: MessageModal>I should be exiting
2/10/2009 15:07:13:875 - START: Exit>0
You gave 5 points to JRL.i Wonder why i have been rated down
A low score does not really mean you have a low reputation, just that you appreciated the help.
Gale