Appscript/py2app demo that allows time delayed start of other applications and documents.
This originated a long time ago from the "MiniTC" demo that used to be part of some appscript tutorial (v0.18.1)
Downloads at my dropbox: http://goo.gl/PXJwFw
- Apple developer tools
- python 2.7 - older versions may work
- py2app
- appscript
python setup.py py2app
Please do not use the system python since this app is 32-bit only due to Carbon dependencies. Download and use the latest 2.7 32-bit version at python.org.
Copy the downloaded app to the Applications folder
The app implements one AppleScript command:
- launchAppWithDelay
which has one text parameter which consists of 3 lines:
-
line: Unix path to an application
-
line: Unix path to a document to be opened by the ap from path 1
-
line: Delay in seconds.
Have a look at the accompanied AppleScript "test_launchwithdelay". The initial use was for a FileMaker forum where the task was to restart the database after a specified amount of time.
When using this from FileMaker to restart itself, the parameter can be calculated with this:
/* posix application path */
"/Volumes"
& Get ( FileMakerPath )
& If (PatternCount( Get ( ApplicationVersion ); "Advanced")>0 ;
"Filemaker Pro Advanced.app¶";
"Filemaker Pro.app¶") &
/* posix document path */
Substitute( Get ( FilePath ); "file:"; "/Volumes") &"¶" &
/* time to wait */
"4.0"
And the "Send Event" call should be configured with:
- Event Class: KWFL
- Event ID: LAWD