Re: What is the limit on osascript command ?
Re: What is the limit on osascript command ?
- Subject: Re: What is the limit on osascript command ?
- From: Paul Taylor <email@hidden>
- Date: Wed, 09 Apr 2008 11:42:03 +0100
hi , thanks Ill try it but what is EOSCRIPT I cant find an explanation ?
Philip Aker wrote:
On 08-04-09, at 00:05, Paul Taylor wrote:
Is there a limit on how long an applescript command can be, Im
attempting to update details of tracks chnaged outside of itunes in
Itunes, the script works when I am not updating many files but seems
to fail as the number of files I update gets larger. Failing with either
return code 1 or 255. the Applescript is actually generated by
another language which is why I use the -e option many times.
Apologies that my
applescript knowledge is VERY slim Im only using it because it is the
only way I can interact with iTunes.
Not AppleScript itself but possibly the limit of tool argument size --
256K -- somewhere in your chain.
You might want to look into another form for your script:
osascript -e << EOSCRIPT
tell application "iTunes"
blah, blah blah
-- 1000 lines of code
blah, blah
blah
end tell
EOSCRIPT
thanks for any help Paul
Here is an example of the command I run, (but Ive stripped out many
of the -e add lines in the real script) in either returns error code
1 or 255
osascript -e tell app "iTunes" -e set new_playlist to (make user
playlist with properties {name:"newPlaylist:3/19/08 7:45 PM"})
-e add(POSIX file "/Volumes/LaCie Disk/Marchive/Gone In 60
Seconds/Soundtrack to Gone In 60 Seconds/Moby - Flower.mp3") to
new_playlist
-e add(POSIX file "/Volumes/LaCie Disk/Marchive/George Thorogood/The
Baddest of George Thorogood and the Destroyers/Move It on Over.mp3")
to new_playlist
-e add(POSIX file "/Volumes/LaCie
Disk/Marchive/Glorytellers/Glorytellers/Tears of....mp3") to
new_playlist
-e repeat with nexttrack in (get every track of new_playlist)
-e refresh nexttrack
-e end repeat
-e end tell
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
_______________________________________________
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