wintergreen Posted August 19, 2009 Posted August 19, 2009 Is there a way to resume a paused script by clicking the close window button? I thought it might be possible by using custom menus, but it seems the FM locks the window the paused script is running on. The problem with this behaviour is that the close window icon doesn't grey out, so there's no visual indication that the button can't be clicked…
mr_vodka Posted August 19, 2009 Posted August 19, 2009 could you post your script. and what exactly do you mean by close button? Do yo mean a button you provide or the native application icon? You may still be able to use a custom menu.
wintergreen Posted October 3, 2009 Author Posted October 3, 2009 I mean the application window close. let’s say you open a new window as part of a script, and then pause the script in order to wait for user input (and also to lock out all other windows from being modified). Users will then inevitably try to “cancel” the paused window by clicking the close window icon. There will be a beep if they do this, but that’s not particularly useful. What I’d like to do is have all the benefits of a paused script, whilst intercepting these “close window” clicks. 1
bcooney Posted October 3, 2009 Posted October 3, 2009 Window users love that close window button, but enabling it means that you give up a modal popup window. That is, in order to pop a window you must Set User Abort Off and hide Status Area. That will disable the close window button. If you don't, they can click on the window behind the popup which is a big problem. So, you really just need to give them a Cancel button. If you only need the paused script to exit and the window to close, then write a simple script "Exit and Close Window" and assign it to the Cancel button. The button is set to Exit current script (that is what ends the pause) and the script simply closes the window. If you need something to happen when they click cancel, I write a script that does Exit Script (result "Cancel"). Then in the script that is paused, I use the structure: stuff before Pause If (Get Script Result = "Cancel") do stuff Else // user clicked Done button do other stuff End If
Newbies Al Partridge Posted October 4, 2009 Newbies Posted October 4, 2009 (edited) Will this example file work for what you need? NOTE: Uses a custom menu. Resume_on_Close_Window.zip Edited October 4, 2009 by Guest
grumbachr Posted April 19, 2011 Posted April 19, 2011 This post is a few months old but it discribes exactly what I'm searching for, I would like to turn the red close window button into a resume script button. Is there no way to do this? I mean the application window close. let’s say you open a new window as part of a script, and then pause the script in order to wait for user input (and also to lock out all other windows from being modified). Users will then inevitably try to “cancel” the paused window by clicking the close window icon. There will be a beep if they do this, but that’s not particularly useful. What I’d like to do is have all the benefits of a paused script, whilst intercepting these “close window” clicks.
grumbachr Posted April 19, 2011 Posted April 19, 2011 See Al's example file. Thanks, I just gave it another try to see If i was missing something but it still doesn't work for me. Clicking on the Mac OS Red window close button FM just beeps at me. Clicking the FM resume button closes the window. I'm using FM 11v3 Advanced on Mac OS 10.6.7
Recommended Posts
This topic is 5313 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