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: "Marc K. Myers" <email@hidden>
- Date: Sun, 18 Nov 2001 11:05:45 -0500
- Organization: [very little]
>
Date: Fri, 16 Nov 2001 14:29:27 -0400
>
To: email@hidden
>
From: harry brindley <email@hidden>
>
Subject: Scripting Default Folder's scripting addition
>
"SetFileDialogFolder" ...
>
>
I'm trying to set the default folder for a choose file or choose
>
folder command in AppleScript. 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?"
>
SetFile DialogFolder myFolder <<<--- parameter error
>
>
... what am I doing wrong here -- or what other simple solutions
>
exist to doing this in Mac OS 9.1?
According to its dictionary, the scripting addition is looking for a
file specification, not the alias that's returned by "choose folder".
This worked fine for me
SetFileDialogFolder ((choose folder) as text)
choose file
because I coerced the alias to text path to the folder.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[11/18/01 11:05:21 AM]