|
RasterWeb: Code: MacPerl > Calling MacPerl from AppleScriptHere's the code use to make an AppleScript droplet call a MacPerl script. Since MacPerl isn't multithreaded, this lets the AppleScript act as a sort of 'cron' agent... Here's our AppleScript. Save it as an 'Application' with 'Stay Open' and 'Never Show Startup Screen' selected. on idle tell application "MacPerl" Do Script "Mac HD:myperlscript.pl" return (10 * minutes) end tell end idle The script 'myperlscript.pl' can do anything you want. It will run every 10 minutes. We can change this by changing the AppleScript Application. And, of course, you can change it to run only once, or at certain times, or all that other jazz. I'm not a big AppleScript freak, but I found this snippet kinda useful (not as useful as a threaded MacPerl would be, of course!) You can also embed a MacPerl script right into your AppleScript, or vise versa... See Chris Nandor's work in this area for more info. |
|||||||||||||||
|
Last Modified: 08.17.2000 by rasterboy |
||