Re: What AppleScript Can Do For Me?
Re: What AppleScript Can Do For Me?
- Subject: Re: What AppleScript Can Do For Me?
- From: Philip Aker <email@hidden>
- Date: Thu, 16 Jul 2009 03:48:31 -0700
On 2009-07-16, at 03:00:02, James Bensley wrote:
Firstly I need to write a script that will show a folder selection box (much like the one you create with the "choose folder" command ) except what I need to do is have the chosen folder list saved to a file (plain text would be great);
So the user starts the script, it lists the folders already in the text file, they can select an entry and remove it or click "add" and browse to another folder with the "choose folder" command and add another to the list and save the text file again?
Things like this are usually done sequentially in plain vanilla AppleScript and the principal working commands would be "choose folder" and "choose from list". However using these commands would make for an awkward user interface considering the goal and the limitations of "choose from list".
For an AppleScript facility that can do the job more or less as described, I'd recommend an implementation using an Xcode AppleScript Studio project. The principal items in the project would be a window with a table view and the Add and Remove buttons. Look through the various Table examples and "Open Panel" project in "/Developer/Examples/AppleScript Studio" to get an idea of how a table view and an open panel work. The natural facility for keeping app-specific data such as the list of previously selected folders is user defaults. You would coordinate a key/value pair in the defaults with a data source (which in turn will supply the table view with the folder list data).
echo email@hidden@nl | tr a-z@. p-za-o.@ Democracy: Two wolves and a sheep voting on lunch.
|
_______________________________________________
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