Internet Connect - I canna script the menu bar, carptan!

Yo folks,

having a problem trying to access a menu bar item in Internet Connect.

I don’t know if it is because Internet Connect’s menu is largely non-Applescript friendly, or if I’m simply not using the correct hierarchy…

I am running Tiger 10.4.7 and here’s the script, Johnny:


tell application "Internet Connect"
 activate
 tell application "System Events"
  click menu item "Import Configurations..." of menu "File" of menu bar item "File" of menu bar 1 of process "Internet Connect"
 end tell
end tell

I’m told this is the correct hierarchy for Tiger and will not be applicable in previous OS X versions, but I may be wrong…

Can someone with vast guru amounts of Applescript knowledge (or more than me at any rate) shed some light on this?

Make it so!

Kind & warm regards from planet Orange.

Model: Dual 1 Ghz PowerPC G4
AppleScript: 1.10.7
Browser: Firefox 1.5.0.4
Operating System: Mac OS X (10.4)

Hi Jason

try this


tell application "Internet Connect"
	activate
	tell application "System Events"
		tell process "Internet Connect" to click menu item 6 of menu "File" of menu bar 1
	end tell
end tell

Merci beaucoup Pidge1, tried that, but I’m still getting the same NSReceiverEvaluationScriptError: 4 error as before.

Could it be the version of Internet Connect v 1.4.2 ?

Do I need to get out the software lump hammer?

This has been driving me nuts for aboot a week.

Anyone else? Step right up!

hi jason

i’ve got same version as you 1.4.2.

have you got GUI scripting enabled and have you got access for assitive devices enabled in system prefs as well

Hi.

You could also check that the three dots at the end of “Import Configurations.” are the single character (ASCII number 201) produced on English-language keyboards with the key combination option-; Menu items that end in “.” usually have this character rather than three full stops in a row.

In GUI scripting, it’s a good idea to make sure that the process in which you want to ‘click’ is frontmost.

tell application "Internet Connect" to activate
tell application "System Events"
	tell application process "Internet Connect"
		set frontmost to true
		click menu item "Import Configurations." of menu "File" of menu bar item "File" of menu bar 1
	end tell
end tell

Nigel G, you are the gooroo!

Yes, it was a combination of changing the 3 dots to the ellipsis thingy and setting the app to Frontmost.

Thanks to Nigel, Pidge, my agent and everyone else who has contributed to my success. (check the use of the option-; :slight_smile: )

Cheers

JAY