Hello. I’m very new to applescript so any advice much appreciated. I’m trying to write a script for the os x ‘internet connect’ window. Here it is so far:
…
tell application “Internet Connect” to activate
tell application “System Events”
tell process “Internet Connect”
if not (exists window 1) then
keystroke “n” using command down
end if
if not (exists window "Airport") then
click button "airport" of tool bar 1 of window 1
end if
tell pop up button 1 of window "Airport"
click
tell menu 1 of pop up button 1
click menu item "Other..."
end tell
end tell
end tell
end tell
…
The script fails at the part where I try to get it to click the “Other…” menu item. I used UIElementInspector and determined that “Other…” seems to be the actual name of the menu item. I don’t think I can use a number rather than the name of the menu item because this menu has a different number of items depending on how many wireless networks are found. Any ideas? Thanks in advance for your help.
Model: macbook
AppleScript: 1.10.7
Browser: Firefox 1.5.0.10
Operating System: Mac OS X (10.4)