Re: Click in Menu Bar 2
Re: Click in Menu Bar 2
- Subject: Re: Click in Menu Bar 2
- From: "koenig.yvan" <email@hidden>
- Date: Tue, 14 Jan 2014 09:42:51 +0100
Le 14/01/2014 à 06:44, Bryan Harris < email@hidden> a écrit : Hello all,
I'm doing this just for fun, to see how in AppleScript. I am trying to click a Menu Bar item (the menu bar by the clock) and I am using a snippet found with google. And for some reason it takes the script forever. After another google search I added the "ignore responses" lines but that doesn't seem to help.
I'm using the latest OS X which says 10.9.1 in the About menu and here is the applescript. Does anyone know how to make this go faster? I tried searching the mailing list using google site:lists.apple.com but didn't get anything for "menu bar 2" with quotes.
ignoring application responses tell application "System Events" to tell process "KeyRemap4MacBook" tell menu bar item 1 of menu bar 2 click click menu item "Preferences..." of menu 1 end tell end tell end ignoring
Thanks in advance for any help.
Hello
I don't own this tool so I tested with an other one and got this running code :
tell application "System Events" to tell process "Alfred 2" tell menu bar item 1 of menu bar 2 click it repeat if exists (name of menu item 3 of menu 1) then exit repeat end repeat click (menu item 3 of menu 1) end tell end tell
The loop is required because reaching the menu item proved to require some time.
Yvan KOENIG (VALLAURIS, France) mardi 14 janvier 2014 09:41:49
|
_______________________________________________
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