Re: Scripting Default Folder's scripting addition
Re: Scripting Default Folder's scripting addition
- Subject: Re: Scripting Default Folder's scripting addition
- From: Bill Briggs <email@hidden>
- Date: Sun, 18 Nov 2001 19:04:16 -0400
At 11:17 AM -0800 18/11/01, Allen Watson wrote:
> set myFolder to choose folder "Folder?"
SetFileDialogFolder myFolder <<<--- parameter error
... what am I doing wrong here
If I recall correctly, choose folder returns a list (in case you choose more
than one). Try adding a middle line:
Set myFolder to item 1 of myFolder
choose folder returns an alias reference form, but not in a list.
choose folder
[with prompt string] -- a prompt to be displayed in
the folder chooser
Result: alias -- chosen folder
"on open" returns a list and requires the strategy you suggested.
The reason is that with choose folder you can only ever select a
single folder, so a list would be a "problem". The "on open" handler
can have many objects to deal with (whatever you drop on the droplet)
and a list is returned even if the number of dropped items is one.
Harry's script compiles on my system and runs as it should. No idea
what the error is that he's seeing.
- web