I am trying to find a script which can switch a special Airport settings. I’m on Tiger in Belgian French.
I do NOT have an airbase, I use only the airport card in my mac to allow my ipod to connect to internet through that “airport card/wifi link”.
For that I need to Share my ADSL link on Integrated Ethernet through Airport.
This can be made in System Preferences - Sharing (then Switch ON “Share personal Web” if it is off, if prefer to close it for security reason but normally that settings is kept) then in the Internet tab click the Launch/Start button, the settings are kept.
Then a dialog/sheet appears and ask a confirmation, click Start/launch.
Then Close System Prefs.
doooo…
The Share Personal Web must be on or it will not work.
I have no idea at all how to automate that… Anyone can help with this script ?
I think I know how to do this in American English, and I’m hoping you can translate into Belgian French.
tell application "System Events"
activate application "System Preferences"
tell process "System Preferences"
delay 0.2
click menu item "Sharing" of menu "View" of menu bar 1
delay 0.2
click checkbox 1 of row 5 of table 1 of scroll area 1 of group 1 of window "Sharing"
delay 0.2
click checkbox 1 of row 10 of table 1 of scroll area 1 of group 1 of window "Sharing"
delay 0.2
click button "Start" of sheet 1 of window "Sharing"
quit application "System Preferences"
end tell
end tell
Everything in quotes needs to be localized, and I think the rest is OK staying in English.
Unfortunately, it has a problem, translation does not change the problem, using “Sharing” or “Partage”.
Increasing the delay to 1 does not change neither.
It opens the prefs, shows the Sharing panel.
Then an error message appears : “~Error in System Events : NSReceiverEvaluationScriptError: 4”, the line after the menu selection is highlighted.
Thanks a lot but this time, it goes a bit further, the internet tab is selected but then an Error occurs here *** see below *** that part is selected. The error message is : “~Error in System Events : NSReceiverEvaluationScriptError: 4”.
tell application "System Preferences"
activate
reveal anchor "Internet" of pane id "com.apple.preferences.sharing"
get properties
end tell
I receive
{current pane:pane id "com.apple.preferences.sharing" of application "System Preferences", name:"System Preferences", frontmost:true, version:"3.3", class:application, show all:false, preferences window:window id 3686 of application "System Preferences"}
This might perhaps help you, if I set the “Keyboard and mouse” pref to “~Tab key jumps to ALL settings” to ON at the bottom of the window.