• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Fwd: Keyboard Input Menu position differs, has no name.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Keyboard Input Menu position differs, has no name.


  • Subject: Fwd: Keyboard Input Menu position differs, has no name.
  • From: Matthew Galaher <email@hidden>
  • Date: Wed, 9 Apr 2003 13:39:15 -0700

Begin forwarded message
Can anyone help me with a way to call the "Input menu" in menu bar 1 regardless of what application is running? I wish to have a script that runs with on idle and clicks the menu item 2 of the keyboard input menu every half hour to make sure it hasn't changed.

tell application "Finder" to activate
tell application "System Events"
tell process "Finder"
click menu item 2 of menu item 9 of menu bar 1
--delay 1
end tell
end tell
tell application theApp
activate
end tell

You need to _tell_ menu bar 1.

Unfortunately you will need the delay. UI scripting is a loose cannon.



tell app "System Events"
set current_process to process 1 whose frontmost is true
tell process "Finder"
set frontmost to true
tell menu bar 1 to click the second menu item in the menu "Input"
delay 1
end tell
set frontmost of current_process to true
end tell

John,
Thank you. That clarifies what the menu name is, and you have allowed me to script this as I had intended: with out the script having to move to the finder and back (since all apps have the "Input" menu only some places it's menu item 9 and in some menu item 5 etc. By calling it by name it can be changed in with out calling the finder):

delay 3--this allows you to test it by giving one time to change apps and see it work.
tell application "System Events"
set current_process to process 1 whose frontmost is true
tell menu bar 1 of current_process to click the second menu item in the menu "Input"
delay 1
set frontmost of current_process to true
end tell

Thank you.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: can't get it to work
  • Next by Date: Trying to create a ssh command using applescript?
  • Previous by thread: Re: Keyboard Input Menu position differs, has no name.
  • Next by thread: Keyboard Input Menu position differs, has no name.
  • Index(es):
    • Date
    • Thread