truelifeajf Posted March 9, 2013 Posted March 9, 2013 I've used FM10 for years but just recently (finally) got FM12. With custom menus, I can attach my own script, easy. So I attach to the "close window" command my own "close window check" script. Easy. And I attach to the "find mode" command my own "enter find mode" script. Easy. Now, within any other scripts, if there's a "close window" script step, the "close window check" script is triggered because it's set to do that within my custom menu. This is a pain but you can get around that in various ways. I used global variables to turn on and off "script triggers". But what I don't get is: Within any other scripts, if there's a "enter find mode" script step, the "enter find mode" script is NOT triggered. Why does a script with a "close window" script step call my custom script attached to the "close window" menu item, but a script with a "enter find mode" script step (and actually "perform find" as well) doesn't trigger any of my custom menu scripts?
David Jondreau Posted March 9, 2013 Posted March 9, 2013 Custom menu scripts usually only run when a user initiates them, not by script. Are you sure it's the custom menu that's triggered? There is another place to set a Close Window script...in the File-->File Options-->Script Triggers dialog.
truelifeajf Posted March 10, 2013 Author Posted March 10, 2013 Awwww... smart cookie! Yeh I originally set the close window trigger in the file options. Right... so scripts only fire from file / layout / field triggers, but not from custom menus. That's interesting because it would appear to me that using file / layout triggers is far more problematic than using custom menu scripts. Having a script fire every time a script calls "close window" seems crazy but it's easily solved by just attaching your "close window" script to a custom menu. I can't see any reason why anyone would want to use file / layout / mode change triggers if there's a corresponding menu item for it.
Recommended Posts
This topic is 4633 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now