• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Script won't run consistently
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Script won't run consistently
      • From: Christopher Stone <email@hidden>
    • Re: Script won't run consistently
      • From: Iurista GmbH <email@hidden>
    • Re: Script won't run consistently
      • From: "S. J. Cunningham" <email@hidden>
  • Prev by Date: Re: A Syntax Question
  • Next by Date: Re: Copy text from pdf to TextEdit
  • Previous by thread: Re: A Syntax Question
  • Next by thread: Re: Script won't run consistently
  • Index(es):
    • Date
    • Thread