Re: Scripting Default Folder's scripting addition "SetFileDialogFolder" ...
Re: Scripting Default Folder's scripting addition "SetFileDialogFolder" ...
- Subject: Re: Scripting Default Folder's scripting addition "SetFileDialogFolder" ...
- From: Bill Briggs <email@hidden>
- Date: Sat, 17 Nov 2001 22:48:16 -0400
At 2:29 PM -0400 16/11/01, harry brindley wrote:
I'm trying to set the default folder for a choose file or choose
folder command in AppleScript.
Do you mean that you're trying to set Default Folder *for* a choose
folder command, or *as the result of* a choose folder command? The
way you have it below the result of the choose folder command will be
the thing assigned to Default Folder. I assume that's what you want.
Default Folder comes with a scripting addition which seems as though
it should be able to do this. But when I try to set it, I get a
parameter error ...
set myFolder to choose folder "Folder?"
SetFileDialogFolder myFolder <<<--- parameter error
For what it's worth, the above compiles and works fine on my
PowerBook running 9.1. But the "Folder?" business is a throwaway
unless you use "with prompt" in front of it. In any event, it doesn't
cause an error even if you leave it there.
... what am I doing wrong here -- or what other simple solutions
exist to doing this in Mac OS 9.1?
That Scripting Addition has never caused me any problems and I've
got it running in a production environment.
- web