Re: Choosing files
Re: Choosing files
- Subject: Re: Choosing files
- From: Emmanuel LEVY <email@hidden>
- Date: Fri, 14 Nov 2014 11:25:47 +0100
Thanks much Shane for sharing this!
A pretty good occasion to remind all AppleScript users that Satimage osax includes enhancements for the "choose file" family, here's the relevant excerpt of the dictionary.
navchoose file v : choose file with navigation services
navchoose file
[with prompt string] : a prompt to be displayed in the file chooser
[of type list of string] : restrict the files shown to only these file types
[starting at alias] : the default file or folder
[multiple files boolean] : allow multiple files selection (default true)
[show packages boolean] : (default true)
[open packages boolean] : (default false)
[of extension list of string] : list of allowed file extensions
[invisibles boolean] : Show invisible files and folders? (default is false)
[key integer] : associate a key to the folder that the user will select. If no 'starting at' parameter is provided, assume the corresponding folder as the default folder.
→ list of alias : the chosen files
navchoose folder v : choose folder with navigation services
navchoose folder
[with prompt string] : a prompt to be displayed in the folder chooser
[starting at alias] : the default folder
[multiple files boolean] : allow multiple folders selection (default true)
[open packages boolean] : (default false)
[key integer] : associate a key to the folder that the user will select. If no 'starting at' parameter is provided, assume the corresponding folder as the default folder.
→ list of alias : the chosen folders
navchoose object v : choose file or folder with navigation services
navchoose object
[with prompt string] : a prompt to be displayed in the folder chooser
[starting at alias] : the default folder
[multiple files boolean] : allow multiple objects selection (default true)
[show packages boolean] : (default true)
[open packages boolean] : (default false)
[key integer] : associate a key to the folder that the user will select. If no 'starting at' parameter is provided, assume the corresponding folder as the default folder.
→ list of alias : the chosen objects
navchoose volume v : choose volume with navigation services
navchoose volume
[with prompt string] : a prompt to be displayed in the folder chooser
[starting at alias] : the default folder
→ list of alias : the chosen folders
navask save v : prompt for save
navask save
[file name string] : name of the file
[action integer] : 1 = before closing, 2 = before quitting, 0 = none
→ integer : 1 save, 2 cancel, 3 don't save
navchoose file name v : Get a new file specification from the user, without creating the file. Uses navigation services
navchoose file name
[with prompt string] : the text to display in the file creation dialog box
[default name string] : the default name for the new file
[with menu list of string] : list of menu items
[menu index integer] : index of the menu item to display
[starting at alias] : the default folder
[show packages boolean] : (default true)
[open packages boolean] : (default false)
[key integer] : associate a key to the folder that the user will select, and assume the corresponding folder as the default folder.
→ file specification : the file the user specified
navnew folder v : Get a new folder specification from the user. Uses navigation services
navnew folder
[with prompt string] : the text to display in the file creation dialog box
[starting at alias] : the default folder
[open packages boolean] : (default false)
[key integer] : associate a key to the folder that the user will select, and assume the corresponding folder as the default folder.
→ file specification : the folder the user specified
Emmanuel
On Nov 14, 2014, at 12:48 AM, Shane Stanley wrote:
> Standard Additions' choose file, choose folder and choose file name commands are staples of AppleScript [...]
_______________________________________________
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