• 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
Can't get the change download folder in Safari script to work - ui scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't get the change download folder in Safari script to work - ui scripting


  • Subject: Can't get the change download folder in Safari script to work - ui scripting
  • From: Tommy Bollman <email@hidden>
  • Date: Sun, 13 Mar 2011 16:30:54 +0100

Hello. I have som problems with Getting the  block marked #!? to work,
I'm using Safari v.5.03 and I think that the layaout of the ui-elements has changed some.

Unfortunately I havent got a decent app for ui-scripting, and wonders if somebody could
help me out.  

It seems to me that there are some sheets involved in the troublesome part.

-- Nicked from http://hints.macworld.com/dlfiles/safari_private_scpt.txt
-- Which are code related to the tip: http://hints.macworld.com/article.php?story=20060801111216518
-- "Set Safari's download folder via script for private browsing - Mac OS X Hints"


set_download_folder("~")

on set_download_folder(dlFolder)
activate application "Safari"
tell application "System Events" to tell application process "Safari"


click menu item "Preferences?" of menu 1 of menu bar item "Safari" of menu bar 1
click button "General" of tool bar 1 of window 1
tell pop up button 3 of group 1 of group 1 of window "General"
click
click menu item "Other?" of menu 1
end tell


keystroke "g" using {shift down, command down}
delay 2 -- NOTE:  This value should be increased if the new download location doesn't appear in the Go To Folder dialog

(* #!? *)

tell window "Go To Folder"
set value of text field 1 to dlFolder
click button "Go"
end tell
(* #!? *)
click button "Select" of sheet 1 of window "General"
click button 1 of window "General"
end tell
end set_download_folder

Best regards




Tommy Bollman

--------------------------------------------------------------------------------------------------

Mollison's Bureaucracy Hypothesis:

If an idea can survive a bureaucratic review

and be implemented it wasn't worth doing.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Can't get the change download folder in Safari script to work - ui scripting
      • From: Luther Fuller <email@hidden>
    • Re: Can't get the change download folder in Safari script to work - ui scripting
      • From: KOENIG Yvan <email@hidden>
  • Prev by Date: Re: Converting UNIX TIME STAMP to Mac Os X Date
  • Next by Date: Re: Can't get the change download folder in Safari script to work - ui scripting
  • Previous by thread: Re: Converting UNIX TIME STAMP to Mac Os X Date
  • Next by thread: Re: Can't get the change download folder in Safari script to work - ui scripting
  • Index(es):
    • Date
    • Thread