Aborting a trigger script

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
gwgs
Posts: 87
Joined: Tue Nov 21, 2006 6:30 pm
Location: Auckland

Aborting a trigger script

Post by gwgs »

I'm creating a trigger on file open that checks to see if the file exists before opening it, and asks the user if they want to create the file.

Is there a way of stopping the trigger from completing the file open if the user response is to not create the file?

I'm using python for scripting, and have tried 'return' which didn't do anything (the file still got created). And sys.exit() closed zeus (not the result I wanted! :) )


Thanks

Grant
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Is there a way of stopping the trigger from completing the file open
No.
I'm creating a trigger on file open that checks to see if the file exists before opening it, and asks the user if they want to create the file.

You could do this by using the file_select_dialog function.

For an example of this function see this Zeus script: zScript\file_open.lua

This script would not be a trigger script but rather an keyboard script. In other words you would need to bind the file open script to the file open keyboard keys.

Cheers Jussi
Post Reply