tmas73 Posted February 24, 2005 Posted February 24, 2005 Is it possible to have a script runnubg that closes the application if there is no activity?? I try do get a solution to work that closes the app after 10 min idle time. Is this possible?? Thanks TMAS
Fenton Posted February 24, 2005 Posted February 24, 2005 Another way to approach this would be with an AppleScript applet (file), which would stay open. It would use the "idle" command, which uses almost no processing power, but just idles (duh) for the period of time you tell it, doing whatever you tell it to do between idles. So it could check something; but what? Non-activity is a difficult thing to tell. The file itself doesn't register being modified until after you close it. The only way I can see would be to use a FileMaker calculation, Max ( Modification Date field ) on a table(s). This could be pretty slow to calculate on a big file. You'd have to compare it to the current time, each time the Idle kicked in, so you could tell if it was >10 min.. The following, when saved as an AppleScript application, with the "stay open" option, will beep every 10 seconds (fun -) idle on idle beep delay 10 end idle
tmas73 Posted February 24, 2005 Author Posted February 24, 2005 Thanks for the reply. But I'll try to not involve any out side apps. Just one developer app. =) Is it possible then to have a script that triggers a timer on launch and after 10 min it will pop up a warning with choice buttons of continue if no response it closes. Are there any script examples of timed pop ups with timed respond button?? Thanks TMAS
Fenton Posted February 25, 2005 Posted February 25, 2005 There is no "timer" running in FileMaker. It can check the system clock, when a modification triggers such, or if you explicitly get/set a time. That is why people (transpower & me) are suggesting apps with very close ties to the operating system, which are capable of running timers. As transpower said, something built with the Unix shell would be your most powerful and secure mechanism. But I wouldn't know how to do that (yet). It may be simple enough; but it has to communicate 2-way with FileMaker. The idle AppleScript app would work, but, as you say, it's another little app; which people could just throw away. Of course you could close the file if they did that. But it's not elegant. You would like to build a test in FileMaker. But the very nature of your test, for someone NOT doing anything, is simply not possible in standard FileMaker, as far as I know. When FileMaker's not doing anything, it's (surprise) not doing anything; hence there is no mechanism.
Fenton Posted February 25, 2005 Posted February 25, 2005 There's also the Account setting to disconnect from FileMaker Server after x minutes.
tmas73 Posted February 25, 2005 Author Posted February 25, 2005 Thanks for your help! How about "get time" and calculate 10 min from the time it got and then pop up a window happends that states "This application will shut down in 5min." in the background it calculate from the 10min+5min. So after 15 it exit the app! Is that working?? Thank You Thomas
Vaughan Posted February 25, 2005 Posted February 25, 2005 Sure, but all of this stuff (popup window etc) has to be triggered by something: either a script being run by the user, or an event plugin. But if the database is idle then there is no event to trigger anything... The abaility for FM Server to disconnect idle users may be the best (perhaps only) option that does not involve other apps.
tmas73 Posted February 25, 2005 Author Posted February 25, 2005 OK got it!! Thanks for helping! =) TMAS
Recommended Posts
This topic is 7214 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