Changing Get File dialog path
Changing Get File dialog path
- Subject: Changing Get File dialog path
- From: John Delacour <email@hidden>
- Date: Tue, 26 Nov 2002 20:11:31 +0000
- Mac-eudora-version: 5.3a9
At 1:07 pm +0000 26/11/02, I wrote:
This ability to write easily to plist files means we can probably
get the functionality of one of the old osaxim (Donald's commands
???), namely to set the default path for open dialogs etc., which
Frontier and OneClick always had but which was always a pain in
AppleScript.
Yes, it works. Here's an example that sets the path for the GetFile
dialog in both Script Editor and Smile. Not very exciting as it is,
but it points to all sorts of useful possibilities.
set apps_ to {" 'com.apple.scripteditor' "}
set end of apps_ to " 'com.satimage.Smile' "
set keys_ to {" 'AppleNavServices:GetFile:0:Path' "}
set end of keys_ to " 'AppleNavServices:GetFile:1:Path' "
set val_ to " 'file://localhost/Users/jd/Library/Scripts' "
repeat with app_ in apps_
repeat with key_ in keys_
do shell script "defaults write " & app_ & key_ & val_
end repeat
end repeat
JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.