If i close down my dialog, my script still runs.

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Alpha_AI
Pro Scripter
Posts: 61
Joined: Wed Sep 19, 2007 9:30 am

If i close down my dialog, my script still runs.

Post by Alpha_AI » Sat Oct 13, 2007 4:29 pm

Hello,

How do i get my script to terminate if i close the dialog?

Ben

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sat Oct 13, 2007 4:59 pm

Closing a dialog returns a value of 2 (to Show or GetDialogAction). So simply check the return value and if it is 2 jump to the end of the script:

Show>dialog,r
If>r=2,end_script
..
..
..
..
..
Label>end_script
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts