• 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
Re: inconsistant AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Newbie Q: Bindings
  • Next by Date: how do I find the contents of a NSSearchField in an array filled with custom objects?
  • Previous by thread: Re: inconsistant AppleScript
  • Next by thread: Customizing the preview in the file browser dialog
  • Index(es):
    • Date
    • Thread