Re: Outline View in AppleScript Stuido
Re: Outline View in AppleScript Stuido
- Subject: Re: Outline View in AppleScript Stuido
- From: Philip Aker <email@hidden>
- Date: Mon, 31 Mar 2008 18:01:06 -0700
On 08-03-31, at 16:17, Connor DiPietro wrote: I have to questions for a project I'm working on in applescript studio. I have an outline view on my main window, and want to show all of the songs/artist in itunes. I wish to do this by setting the outline view to (typically) {Macintosh HD/Users/___/Music/iTunes Music . This way all of the music is already sorted. I need to know how to set this up. i think its something along the lines of set content of outline view 1 of scroll view 1 of window 1 to {"Macintosh HD","Users","Connor","Music","iTunes Music"}
but im not doing something right. How do i set the outline view to a folder?
Also, lets say i was sending this application to someone. There user name is not going to be "Connor". is there a generic file path to this folder, that doesnt have changing variables like the users name, or the name of the hard-drive?
You will be very happy to know there are quite a few standard paths available. To view them, open up the "Script Editor" application, and then choose "Open Dictionary…" from its File menu. From the list that appears, choose "StandardAdditions" and in the dictionary that will be opened, select the "File Commands" suite. In that suite, look at the second "path to" entry.
To use the 'path to" command result as a basis for constructing a path suitable for use in AppleScript Studio, the following technique is very common:
POSIX path of ((path to music folder from user domain as text) & "iTunes:")
Note the trailing ":" to indicate a folder in an HFS path style (probably not necessary in this case).
Philip Aker |
_______________________________________________
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