Page 1 of 1

How do you interupt a script.

Posted: Sat Feb 09, 2008 2:33 am
by no1g8tor
I have a a script that call a chain of scripts that are embedded in the stack scripts of many stacks.

On my first script, I open the file dialog box and user has to click on a file to import. If they click on the file and press open, everything continues and works great.

If they click on the "cancel" button, it just closes the dialog and still continues.

How do you stop the script and put in a line of code that says something like:

if it is "cancel" then go to cd "home"
stop script "open Files" -- I know this is not a legal line of code..lol.

Thanks you so much

Posted: Sat Feb 09, 2008 2:56 am
by paul_gr
One way is to use something like this to kill the answer dialog::

if it is empty or the result is "cancel" then exit to top

I might be wrong of course.

Paul

Posted: Sat Feb 09, 2008 3:19 am
by no1g8tor
It works, but with one problem.

It just stays on the card I called it from.

Is there a way to have it stop and then goto my 'home" card?

Posted: Sat Feb 09, 2008 5:31 am
by paul_gr
straight after the answer line, put

if it is "Cancel" then go to card "whatever"

Paul