• 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
Re: Swap keyboard from "belgium" layout to US
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swap keyboard from "belgium" layout to US


  • Subject: Re: Swap keyboard from "belgium" layout to US
  • From: Jan Bultereys <email@hidden>
  • Date: Tue, 25 Apr 2006 15:54:21 +0200
  • Thread-topic: Swap keyboard from "belgium" layout to US

Hi does any know how to make this to work on panther?
" count menu bar items" is not recognized by panther



on switch_keyboard to keyboard_layout
    tell application "System Events" to tell menu bar 1 ¬
        of application process "SystemUIServer"
        (* workaround for bug in conditional filter: *)
        repeat with this_menu from 1 to count menu bar items
            try
                tell menu bar item this_menu to if ¬
                    (get value of attribute "AXDescription") ¬
                        is "text input menu extra" then
                    click (* open menu *)
                    tell menu item keyboard_layout of ¬
                        menu 1 to if exists then return click
                    cancel (* operation failed: close menu *)
                    exit repeat
                end if
            end try
        end repeat
    end tell
    beep (* indicate that a failure occurred *)
    error number -128 (* cancel script execution *)
end switch_keyboard

switch_keyboard to "U.S."
delay 1
tell application "System Events"
    tell process "QuarkXPress"
        set frontmost to true
        key code 42 using {command down}
    end tell
end tell
switch_keyboard to "Belgian"

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Swap keyboard from "belgium" layout to US (From: Felix Grasser <email@hidden>)

  • Prev by Date: Re: scripting Word top copy text - should be simple, but ain't
  • Next by Date: Re: Plugins
  • Previous by thread: Re: Swap keyboard from "belgium" layout to US
  • Next by thread: Re: Swap keyboard from "belgium" layout to US
  • Index(es):
    • Date
    • Thread