Be forewarned, I’m probably just making some newbie mistake, but a Google search finds a number of posts about unexpected results with Leopard, so I thought I would ask.
I didn’t get into trying to script this bit of GUI when I had Tiger, so I don’t know if this problem is unique to Leopard or not.
I’m trying to script this:
<AXApplication: “GraphicConverter”>
<AXMenuBarItem: “File”>
<AXMenuItem: “New”>
<AXMenuItem: “Video Grab Window”>
I’ve tried lots of variations and gotten lots of error messages. This is where I am right now:
tell application "GraphicConverter" to activate
tell application "System Events"
tell process "GraphicConverter"
tell menu bar 1
click menu item "Video Grab Window" of menu item "New" of menu "File"
end tell
end tell
end tell
With this, the error message is:
System Events got an error: Can’t get menu item “Video Grab Window” of menu item “New” of “File” of menu bar 1 of process “GraphicConverter”.
If I look at <AXMenuBarItem: “File”> and change it to:
of menu bar item “File”
I get:
System Events got an error: Can’t get menu bar 1 of process “GraphicConverter”. Invalid index.
All help appreciated.
Thanks.
-Dave
Model: iMac Core 2 Duo with 10.5.1
AppleScript: 2.2
Browser: Safari 523.10.6
Operating System: Mac OS X (10.5)