Hiya - I wrote a simple AppleScript that uses Assistive Devices and sets proxy server settings in System Preferences. The script works great, but I am wondering if anyone knows how to hide the results?
So when the script is run, it does not show System Preferences being opened and the proxy info being set?
Basically, is there a way to hide the results of the Applescript using GUI mode?
Thanks,
Bill
Could this do the job? (I wouldn’t do so, btw)
tell application "System Preferences"
set {a, b, c, d} to (bounds of window 1)
set bounds of window 1 to {a + 5000, b, c, d}
set current pane to pane "com.apple.preference.network"
end tell
--> follows sample code
tell application "System Events" to tell process "System Preferences"
click pop up button 2 of window 1
click menu item 4 of menu 1 of pop up button 2 of window 1
tell group 1 of window 1
repeat
try
if not (exists radio button "Proxies" of tab group 1) then error
click radio button "Proxies" of tab group 1
exit repeat
end try
end repeat
set value of text field 2 of group 1 of group 1 of tab group 1 to "xx.xx.xx.xx"
end tell
click button 7 of window 1
end tell
--> end sample code
tell application "System Preferences"
set bounds of window 1 to {a, b, c, d}
quit
end tell
Thanks, that did the job.
Bill