Press the Down Arrow key (or any other key)



  • You could use this to advance your Powerpoint slides for instance, if you had something like this setup.

    Save this text to c:\scripts\key.vbs:

    Dim Wsh
    Set Wsh = Wscript.CreateObject("Wscript.Shell")
    Wsh.SendKeys "{" + WScript.Arguments.Item(0) +"}"
    

    Then create a command that runs this:

    wscript c:\scripts\key.vbs down
    

    You could also make a batch file script that types things like this:

    wscript d:\scripts\key.vbs T
    wscript d:\scripts\key.vbs R
    wscript d:\scripts\key.vbs I
    wscript d:\scripts\key.vbs G
    wscript d:\scripts\key.vbs G
    wscript d:\scripts\key.vbs E
    wscript d:\scripts\key.vbs R
    wscript d:\scripts\key.vbs c
    wscript d:\scripts\key.vbs m
    wscript d:\scripts\key.vbs d
    

    Or you could use a vbs script like this:

    Dim Wsh
    Set Wsh = Wscript.CreateObject("Wscript.Shell")
    Wsh.SendKeys "{T}{R}{I}{G}{G}{E}{R}{c}{m}{d}"
    

    This article has more info about special keys.



  • How would I do something like Ctrl+Tab?



  • @kellanist, in theory this script would do it, but I don't have any app that would respond to CTRL-TAB, so I didn't test it.

    Dim Wsh
    Set Wsh = Wscript.CreateObject("Wscript.Shell")
    Wsh.SendKeys "^{TAB}"
    


  • @Russ Chrome! =)

    Ctrl+tab = move to the next tab to the right.
    Ctrl+Shift+Tab = move to the previous tab to the left.
    Crtl+W = close tab.

    I use those programmed into my mouse to navigate around the browser.



  • @kellanist, duh, I use that CTRL-TAB key combo in chrome. It just didn't register in my brain.

    Anyway, I just tested it from my phone and it worked for me - my PC switched chrome tabs when I ran it. Let me know if it works for you please.



  • This post is deleted!


  • @Russ Ctrl+tab and Ctrl+Shift+Tab work perfectly.

    Ctrl+W for some odd reason causes Chome to close entirely instead of just closing a tab.

    I've tried "^(W)" and "^W" and they both close the window instead of a single tab. I'm a bit confused as to what is going.

    One other thing. Tried to setup Alt+Tab for switching windows and it works but triggers NUM lock for some odd reason. Using "%{TAB}".



  • Can you hold down a button?



  • @Jcjcc, tell me more - what are you trying to accomplish?


Log in to reply