Page 1 of 1

Aborting a trigger script

Posted: Thu Jul 11, 2013 2:39 am
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

Posted: Thu Jul 11, 2013 3:17 am
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