2
I am currently using this UNIX shell command in my script file:
do shell script "open ~/Dropbox/Media/VisionBoard/*"
Is there another way to do it and if so would it be any better or different? I'm still new to programming, so please be gentle.
What's the significance of "as alias," and is that why we can't say
open every item of ((home as text) & "Dropbox:Media:VisionBoard")
? – NReilingh – 2010-08-12T18:42:11.847I am no AppleScript guru, just a student. There may be many ways to do it.
From Apple's AppleScript Language Guide: “An alias object is a dynamic reference to an existing file system object. [...] The following is the recommended usage for these types:
http://developer.apple.com/mac/library/documentation/AppleScript/Conceptual/AppleScriptLangGuide/conceptual/ASLR_fundamentals.html#//apple_ref/doc/uid/TP40000983-CH218-DontLinkElementID_362
3@NReilingh By default, Applescript treats the bracketed term as a string. The every keyword specifies every object in a container. Strings contain characters. If you try and open every item of a string, AppleScript will throw an error because it can't convert the characters into type item. Items in the Finder are files, folders, etc. Therefore you coerce the file path string to an alias, which is a reference to an existing file, folder, or volume in the file system. The Finder can then treat that alias as a container of file system items. – ghoppe – 2010-08-12T19:52:03.267
Thanks for the discussion. It gave me some great insights as to how AppleScript works.
The information is probably of no tangible use, but can anyone confirm my suspicion that running pure AppleScript is more efficient than using it to perform a shell script? – Orion751 – 2010-08-13T18:59:48.473