Script won't run consistently
Script won't run consistently
- Subject: Script won't run consistently
- From: Rob Lewis <email@hidden>
- Date: Wed, 09 Jul 2014 08:38:14 -0700
My wife’s old iBook is strewn with AppleWorks files all over her user account and I want to collect them by creating a folder of aliases to them.
The script is pretty straightforward:
—Prompt the user for a folder to put the aliases in, and a starting folder to search
—Recursively search the folder and its subfolders (using recursive calls in the code)
—If a file has a “cwk” extension and is not an alias, create an alias to it in the chosen folder
The problem is, I can’t get consistent results on successive runs. One time, it quit with a “Finder can’t get…” error (so I wrapped that in a try block). The last run ended with “Apple Event timeout”.
Currently the target folder for the aliases is on a FireWire-connected external drive. If it went to sleep, could that cause the timeout? Should I wrap the whole thing in a ridiculously long “with timeout of…” block?
Also this is my first attempt to use AppleScript’s “log” command. It appears to only work if the Event Log tab is selected when you start the script. Is that how it’s supposed to work? I’ve been a little wary of doing that (choosing the Result tab instead), worried that with thousands of files a huge log might cause other problems. Is this a concern?
Also, would it be better to search for creator type “BOBO” rather than file extension “cwk”?
Any thoughts appreciated.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden