How do I script the Application Switcher?

I would like to write a script that brings up the application switcher, to allow its use without having to use the actual "command-tab" keyboard shortcut. This seems like a very simple thing, but I haven't been able to find any solution.
I initially thought that I might be able to access the application switcher directly through the Finder or System Events libraries, but that doesn't seem to be the case.
Then I turned to just having applescript execute the keyboard shortcut directly. While I can do a "keystroke tab using command down", what I want is to bring the app switcher menu up and leave it. Using a keyboard, I would hit control-tab, then continue to hold command (during which time I can do things like use the arrow keys). So I thought I would have my script simulate this behavior. Unfortunately I gather that modifier keys can only be modifiers for other keys, not held alone (with a "key down command" line). Is this correct?
Any other ideas? Ideally I want one script to bring up the app switcher (or do command-tab, with command left held) and another script to dismiss the switcher, choosing the app selected (or releasing the command key).

While the System Events script presented here, which you've tried, and a variation of which I've used in the past, might seem worthwhile, it is actually fraught with at least two potentially dangerous gotchas.
Problem one: Your Command key will be tied up for the duration of the script, as determined by the specified delay time, even if you dismiss the Application Switcher palette early by clicking off it. That means no use of your keyboard or mouse for the full 10 seconds (or however many seconds you specify) without the Command key acting as a modifier for whatever action you might want to take, in whatever application you're in. For example, clicking on a docked application icon during this 10-second delay will not switch to that application as you might expect, but will instead reveal its location in the Finder -- normal behavior when a docked icon is otherwise intentionally Command-clicked. Attempting to kill the script early by pressing ⌘. will only make things worse.
Problem two: Attempting to kill the script early by pressing ⌘. might not allow the script to reach the *key up* command, which is critical. If you don't allow the script to reach the *key up* command, your Mac will remain in a state where your Command key is virtually kept held down, rendering your keyboard useless, and producing the kind of mouse weirdness described above, +even after exiting the script.+ Logging out and back in to your account does cure this condition, however. Fortunately, should this unpleasant situation arise, you can avoid the need to log out by keeping a ready-made script +saved as an application+ available in your Script menu and running it if needed:
*tell application "System Events"*
*key up command*
*end tell*
Just my 2¢... Good luck.

Similar Messages

  • I am not able to download any application from the App Store it is showing the the message that your account is not for US store to download the application switch to Indian store

    I am not able to download any application from the App Store it is showing the the message that your account is not for US store to download the application switch to Indian store

    This article explains how to change the iTunes store country on your phone: http://support.apple.com/kb/ht1311.

  • Changing the application switcher shortcut

    Hi,
    Can anyone help me find where or how to change the application switcher shortcut (command-tab).
    I'm using illustrator and I'm used to switching between my selection tools using command-tab. But now with OSX Leopard, every time I do that, it just switches applications.
    I've tried mac help and also have searched these forums but haven't found a similar request.
    Thanks.

    I've been looking everywhere for a way to change this, or at least disable the shortcut. I have the same problem, but with QuarkXPress. I know that the command originates from the Dock, so I bet there's a way to hack the Dock so it disbles the shortcut...

  • How to find out the application server info

    Hi, I am wondering how to find out the application server info in Java code, just like how to find out the db platform being used. Thanks

    Hi,
    I am not aware of any spec defined way of finding out such info. There may be vendor specific APIs or mechanisms.
    But you can use environment entries in your deployment descriptors to specify the information and make use of the entries inside your j2ee component. That will make your code platform neutral.
    Sahoo

  • How can I allow the application to line through a field that has been locked after being digitally signed?  We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once

    How can I allow the application to line through a field that has been locked after being digitally signed?
    We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once the approved information is entered we line through the proposed field so the data entry clerk won't pick up the wrong information.  However we are receiving an error when attempting to enter data  in the field which we have this edit.  Error property: line through cannot be set because doing so would violate the document permission setting.  any idea how we can get around this issue?

    You can control which fields are locked down after signing by setting up a collection. Then those that are not locked can be changed after signing. If this is not possible, then the line outs must occur prior to signing.

  • I've downloaded Photpshop elements 13 : how can I open the application ?

    I've downloaded Photpshop elements 13 : how can I open the application ?

    Thank you Kglad and John
    Your question about 32 bit or 64 bit was good. In fact, before our exchanges, I downloaded Photoshop but I didn't run the application.
    After our messages, I tried to click the setup
    First,when I clicked  "setup" in the directory ""32 bit PhotoshopElem13" I had an error message , then, I clicked the setup in the second directory, it was the good one.... 64 bit !
    All is OK
    "Merci" from Paris

  • How do you download the application???????  It says to pick an application to download??? What?

    How do you download the application?   After I hit download, It says to pick an application to download.  That doesn't make sense. 

    Norma Jeanne,
    This may be one for this specialized forum (where you may be able find the answer from previous threads),
    http://forums.adobe.com/community/download_install_setup
    or for Customer Care (tick I Still Need Help and hope for an agent available for a chat),
    http://helpx.adobe.com/contact.html?product=illustrator&topic=downloading-installing-and-s etting-up
    or for Adobe Support (phone),
    http://helpx.adobe.com/adobe-connect/adobe-connect-phone-numbers.html

  • What is adobe autoanalyzer and how do i quit the application? it's preventing me from downloading an

    what is adobe autoanalyzer and how do i quit the application? it's preventing me from downloading and installing updates to elements 11 and camera raw

    To quit Auto analyser, open task manager/Activity monitor and look for 'ElementsAutoAnalyzer' and kill this process/exe.
    Auto analyser is an exe used by Organizer for performing 'media analysis' (assigning smart tags to images).
    ~Andromeda

  • How do you set the application directory to be constant in a project?

    Hello,
        How do you make the application directory to be same all the time? Every time I create a executable I want to be able to have the executable in the same directory all the time.
    Regards,
      Kaspar
    Regards,
    Kaspar

    Do you mean the path that the application builder puts your executable?
    Please mention the version of LV you're using or post a screenshot of your attempt, screenshots differ for LV versions.
    André
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • How do you get the applications folder on mac book pro

    How do you get the applications folder on mac book pro?

    To access it, you open the Finder (blue face at bottom left of dock) and click the Applications shortcut you'll find there.
    Matt

  • How can I get the Application DVD for IMAC Late 2009?

    How can I get the Application DVD for IMAC Late 2009?

    Disk 2 of the original disks that came with the computer?
    Call Apple, give them your computer serial number, and they will ship you disks for a small charge if disks are available. Go to the Apple Store for your country, then to the bottom of the page//Contact Us for the correct telephone number.
    If that isn't what you ant, can you provide more information?

  • How do I stop the application check everytime I open itunes?

    How do I stop the application check everytime I open itunes? I have 200 apps and to have to click 200 times for every app to confirm I do not want  to replace my newer version with an older version is a serious bug!  Is there something to click off the check, I have already told the preferences to stop checking for new software!

    I have resolved the problem. Steps to resolution:
    1. Deleted all applications inside the folder "Automatically added to iTunes," many of those apps were also inside the Mobile Applications folder.
    2. Next, I uninstalled iTunes, and downloaded the latest version of iTunes.
    3. Restarted the computer.
    4. Installed the newest version of iTunes. 
    This repaired the problem.

  • How do I remove the application from your iPad at the same time and with the clouds?

    Hello,
    how can I remove the application from your iPad at the same time and with the clouds?
    I know you press the app icon until it starts shaking, then press the black cross in the upper left corner. This will remove it.
    But still I will come in to the store as a bookmark Purchated I see it with the symbol of a cloud. And I would like to remove it for good. Under iOS 5.1.1 somehow I managed to do that (at least hide it). In iOS 6 I can not do that.
    I greet

    The only transition you can add this way is default cross dissolve. If the images are in the timeline, move the playhead to the beginning of the images, select them all, and drag from the timeline to the canvas to overwrite with transition.

  • How can i vusualize the application Java in my system ? i have actually problems to install my bank's protection module -

    How can i vusualize the application Java in my system ? i have actually problems to install my bank's protection module … My computer is an Imac and the Operation System is OS X Mountain Lion 10.8.2 ... PLEASE HELP ... THANKS !!!

    Thanks about your advise but i can not change my bank accout ... this protection module will only works if i have the java installed in my imac ... I just bought the OS X Mountain Lion (10.8.2) new version and i can not see WHERE IS THIS JAVA ??? When i open my "system preferences / others / ... there is nothing  . My bank told  me that without this JAVA i Will not have my protection module. Can you help me  to find it in my Imac ???

  • How can I transfer the application Keynote from my old computer to a new one and get rid of it on the old computer?

    My MBP from 2008 is being retired by my university and they gave me a new MBP.  They transferred everything from their image and all my iWork documents were transferred.  However, since I added Keynote, Numbers, and Pages, they did not transfer.  He said they cannot transfer them since they are not part of their image and active directory.
    How can I get the iWork apps to my new computer and disengage them on the old computer without paying another $60?
    Thanks so much for any advice.
    Best,
    HED

    If you installed them from a DVD, you need to install that DVD onto the new computer. If you got them from the Mac App Store, redownload them from there for free.
    Having previously purchased an application on DVD or from the iTunes App Store does not allow a free download of it from the Mac App Store.
    (71807)

Maybe you are looking for

  • HT201077 Photo stream crops photos

    I uploaded some photos into my MBA iPhoto. I have Photo stream enabled on iPhone and iPad. Some photos show up cropped, although I have never cropped them. Any ideas?

  • WHERE IS iMIX SEARCH BUTTON???

    This has been driving me a little bonkers!!! Why can't I search for iMixes???

  • Music (not mine) plays upon start up. How do I get rid of it?

    Some music (sounds like from a slot machine) plays every time I startup Firefox. I've reinstalled the application, and replaced both the Firefox folder from the user's library Application Support folder and the org.mozilla.firefox.plist from the user

  • HP Pavilion dv6-6c50se Entertainment Notebook PC -AMD Radeon HD 7690M XT

    hey, first of all i'm not good in english plsss understand my words. . . thank you. . . I installed the AMD High-Definition Graphics Driver Version8.882.2.3000 for my videocard AMD Radeon HD 7690M XT then atfer i install it....my screen gets black an

  • Clicking on MacBook

    Just curious, is tapping the MacBook touchpad with one finger the same as clicking the mousepad? I have a Dell laptop (unfortunately), and when I tap the touchpad with one finger, it's the same as actually pressing the left-click button. I know that