I need to write a script that will check to see if an app is open then disconnect the remote access dial up if it is closed, and wait if it is not closed.
or
is there a way to pause the execution of the script until the app in question completes its close command?
Thanks
: I need to write a script that will check to see if an app is open
: then disconnect the remote access dial up if it is closed, and
: wait if it is not closed.
: or
: is there a way to pause the execution of the script until the app
: in question completes its close command?
: Thanks
I use ScriptSynch which will do this and other things when launch or quitting applications synchronously. It’s freeware and can be found at www.kagi.com/authors/marka
Good Luck.
You might try testing to see if the app in question is “in” Akua’s [b:000]all processes[/b:000].
[color=#FF00FF:000]Andreas[/color:000]
::a script that will check to see if an app is open
::then disconnect the remote access dial up if it is closed, and
::wait if it is not closed, or is there a way to pause the
::execution of the script until the app in question completes
::its close command?
: I use ScriptSynch which will do this and other things when launch
: or quitting applications synchronously. It’s freeware and can
: be found at www.kagi.com/authors/marka
Or the Sleep Commands osax, which will make your script sleep until an app is running or not running. For vanilla applescript, an idle handler can check processes periodically.
I solved the problem. here is the solution:
tell application “Finder” to application processes as string
set apps_open to result
repeat until apps_open does not contain “Macjordomo1.5fc28”
tell application “Finder” to application processes as string
set apps_open to result
end repeat
Thanks for all the help.
Wiley
First check if the app you’re using has a “disconnect on quit” function.
Otherwise:
Depending on whether you wish to know the time the computer has idled, or whether you wish to schedule a script at times of day or following certain events or repeatedly try:
Acron http://wrcu.coLgate.edu/sean/Acron/index.html
Akua Sweets http://osaxen.com/index.php3?id=akua_sweets
Cron http://gargravarr.cc.utexas.edu/cron/index.html
Cruise Control http://www.walnutsys.com/
DaemonCron Lite 1.5 http://homepage.mac.com/dcoshel/daemon.html
idle time osax http://osaxen.com/index.php3?id=idle_time
idle time extension http://www.dijas.com/ely-old/files-scripting.html
iDo Script Scheduler http://www.sophisticated.com/software/
Keyquencer http://www.binarysoft.com/kqmac/kqmac.html
MacAT http://gimr.garvan.unsw.edu.au/gerham/macsos/macat/index.html
PowerTask http://www.compsoftspec.com/powertask.html
QuicKeys http://www.quickeys.com/
Scheduler http://hotyellow98.com/jvarela/
Script Scheduler http://www.wmotion.com/products.html
Script Timer http://www.theboss.net/appsmore/
Sleep Commands http://home.earthlink.net/~eagrant/
T-Minus Ten http://home.austin.rr.com/mk/tmt/tmt.html
You may already own iDo, as it came free with OS8 thru 8.6, I think.
My earlier posting was perhaps a bit too brief. What I meant was for you to use something like:
repeat until “Macjordomo1.5fc28” is not in (all processes)
– act accordingly
end repeat
Obviously you can vary that in many ways - leave out the “not” - use “repeat while” or “repeat until”, etc, etc.
A shorter bit of coding - and it will run more quickly partly because it doesn’t use the Finder.
Andreas