Jump to content
DeathRobot

Continue with script after a time if user doesn't press any buttons

Recommended Posts

I have a shutdown script where if you quit or close the last window, a dialog box comes up and asks if you really want to quit. Pressing "cancel" halts the script, pressing "continue" closes the last window and so quits Filemaker.  I'm trying to figure out how to cause the script to continue and close the last window after a period of time (say, 10 seconds) if the user doesn't press anything at all. Script is:

Open dialog that says "Close this last window? This will close dBase completely."

If [ Dial_GetButton (DIALOGTEXT) = 2 ]     >>Note: I use Troi Dialog<<
     Halt Script
Else
     Go To Layout [ "DevStartup" (DevStartup) ; Animation: None ]
     Close Window [ Current Window ]
End If

Thanks for any help with this.

Share this post


Link to post
Share on other sites

You could open the dialog in a small card window.  

Your script would open the card window, and pause for 10 seconds, then close.

On the window you could have 2 buttons, 'OK' and 'Cancel'.  

'Cancel' would halt the first script.

'Ok' could either do nothing (as the first script will continue and close the file), or Halt the running script and fire the close file (close card window, then close file).

You could also make it one script and attach script parameters to the buttons to do everything in one script.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Who Viewed the Topic

    2 members have viewed this topic:
    arni  Lee Smith 
×
×
  • Create New...

Important Information

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