Re: inconsistant AppleScript
Re: inconsistant AppleScript
- Subject: Re: inconsistant AppleScript
- From: Matt Neuburg <email@hidden>
- Date: Thu, 25 May 2006 14:25:04 -0700
- Thread-topic: inconsistant AppleScript
On Thu, 25 May 2006 10:45:10 -0700 (PDT), Jerrod Fowkes
<email@hidden> said:
>I found this line was causing it to bomb :
> set absolute_filename to ":" & root_folder & ":" & user_folder & ":" &
music_folder & ":" & product & ":" & publication & ":" & date_folder & ":" &
filename as alias
>
>which yields to the eye as something like:
":Users:username:Music:product:publication:12312005:filename.mp3"
>
>when Script Editor ran it, it put the startup disk volume name in front of
absolute_filename for me which mine is Macintosh HD so when I output it it
actually read:
>
>"Macintosh HD:Users:username:Music:product:publication:12312005:filename.mp3"
Basically, what you were doing was illegal. Partial pathnames are
deprecated, and how they will be treated is undefined, so it was just chance
that this was working at all. In fact, the fact that it worked could be
regarded as a bug; properly, Script Editor should have reached out and
slapped you instead.
>it works just fine now. this particular solution was fairly simple. However, if
there are any more querks in Script Editor and using NSAppleScript I would like
to know
Basically it's just a matter of knowing the AppleScript language. If you'd
read my AppleScript book, you'd have known not to use partial pathnames. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden