• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Changing Get File dialog path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: lock the screen from the keyboard, win a prize (From: Paul Skinner <email@hidden>)
 >Re: lock the screen from the keyboard, win a prize (From: John Delacour <email@hidden>)

  • Prev by Date: Re: Importing flat files into FMP
  • Next by Date: PPD in OSX
  • Previous by thread: Re: Kindershell
  • Next by thread: Re: lock the screen from the keyboard, win a prize
  • Index(es):
    • Date
    • Thread