Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Resume Paused Script with window close?

Featured Replies

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…

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.

  • 1 month later...
  • Author

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.

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

Will this example file work for what you need? NOTE: Uses a custom menu.

Resume_on_Close_Window.zip

Edited by Guest

  • 1 year later...

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.

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

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.