Re: menu bar 1 in 10.8?
Re: menu bar 1 in 10.8?
- Subject: Re: menu bar 1 in 10.8?
- From: Mads Fog Albrechtslund <email@hidden>
- Date: Thu, 27 Jun 2013 13:08:37 +0200
On 27/06/2013, at 13.00, LuKreme <email@hidden> wrote:
> Is there a change in System Events GUI scripting recently?
>
> tell application "Mail"
> tell application "System Events"
> click menu item "Add Account" of menu 1 of menu bar item "File" of menu bar 1
> end tell
> end tell
>
> => error "System Events got an error: Can’t get menu bar 1." number -1728 from menu bar 1
>
> I also tried this:
>
> tell application "Mail"
> tell application "System Events"
> tell menu bar 1
> tell menu "File"
> click menu item "Add Account"
> end tell
> end tell
> end tell
> end tell
>
> With the same results.
This works for me, in OS X 10.8.4
activate application "Mail"
tell application "System Events"
tell process "Mail"
click menu item "Add Account…" of menu 1 of menu bar item "File" of menu bar 1
end tell
end tell
/Mads Fog Albrechtslund
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden