Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Solved! Perl/Applescript combo...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Solved! Perl/Applescript combo...
Authored by: Anonymous on Mar 31, '01 01:21:48AM

I got it working! The answer is to write a simple little applescript like so:
tell application "Finder" quit end tell tell application "Finder" activate end tell

Then, save it in Mac OS X Applet format from ScriptEditor, and put it in a useful directory. I used my users/me/Library/ folder, and put robh's perl script in there too, but with a little modification: Replace the part where he kills the finder by process id, with a call to the applescript like so:

# call applescript to restart finder print STDERR `open /Users/username/Library/finder_restart_applescript`;

Save this new script, chmod it so it's owner executable (chmod u+x, and set up a cron to run it (I cheated and used the CronniX app, which is a nice front end, look for it on versiontracker), and there you go!

This does forcibly quit the finder, so if you knew more applescript, you could have it throw up a warning to the user, or else just schedule it for three in the morning!


[ Reply to This | # ]