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


Click here to return to the 'Work around an AppleScript bug in iTunes 9.0.2' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Work around an AppleScript bug in iTunes 9.0.2
Authored by: Hal Itosis on Dec 11, '09 08:25:58AM
Don't do that. There is a reason a script is saved as either an app or plain compiled script. While you were lucky that the change you made to the script seemingly had no effect, this is a hack which will not be beneficial in most instances.

Actually, i've found the opposite to be true. In *most* instances, folks save scripts as applets for absolutely no good reason (other than it enables them to be double-clicked or Docked i suppose). Whereas, saving as a .scpt instead and "launching" from Script Menu (or hotkey via FastScripts, or Spark, etc.) results in the same code running some six times faster [which certainly qualifies as a benefit, IMO].

I suppose there may be a few exceptions, but i have yet to encounter one.

-HI-



[ Reply to This | # ]
Work around an AppleScript bug in iTunes 9.0.2
Authored by: tedw on Dec 11, '09 12:05:04PM
The only reasons I can think of (off hand) to save a script as an application are
  1. you need the script to stay open for a while to watch or wait for some event
  2. you need the script to preserve data across runs (properties won't be retained in a .scpt file, but they will in an app package)
  3. other apps need to call the running script (.scpt files don't have an easily accessible system identity, while app packages do)
  4. you need or want to run the script from the Finder rather than a scripting context like the script menu
if none of those apply, your script should run fine as a script file.

[ Reply to This | # ]