Neat utility to run a keyboard shortcut

Sunday, February 10, 2008 by johnthecompnerd | Discussion: Personal Computing

Do any of you know of a neat little application that will emulate a keyboard shortcut when you open it? I desperately need one of those for my dock. I use Virtual Desktop Manager. it's kind of like Spaces except not as fancy and it's for windows. It's actually a Microsoft PowerToy. but anyways, I'd like for there to be an icon in my dock that when you click it, it runs a keyboard shortcut. I have the free version of OD so don't call me an idiot if there's something like that for OD+ (idk whether there is or not but whatever) Frankell recommended using a macro, but when I googled it (macro keyboard shortcut) I got ... well mac stuff and Microsoft crap. any suggestions?
SirSmiley
Reply #1 Sunday, February 10, 2008 7:17 PM
If that's all you're looking for then a simple script using the Sendkeys Method should do it.

Something like this:
This would be ctrl+s

Code: vbscript
  1. var WshShell = WScript.CreateObject("WScript.Shell");
  2. WshShell.SendKeys("^s");


Code: javascript
  1. var WshShell = WScript.CreateObject("WScript.Shell");
  2. WshShell.SendKeys("^s");
frankell
Reply #2 Monday, February 11, 2008 1:33 AM
Hi
using AutohotKey:
you can make the .exe for your little macro
+ run the shortcut .exe in OD

WWW Link
smartaz
Reply #3 Monday, February 11, 2008 5:45 AM
frankell




Beat me to it.



Autohotkey is way cool.



johnthecompnerd
Reply #4 Monday, February 11, 2008 7:50 PM
Ooh, thanks!!! I have to ask though. does the sleep command work OK for you guys? i can't get it to work. The expose works great. I figured I could make AutohotKey do the sleep function for me. I've tried both #us and {sleep}. I'd like for there to be a way how to have pauses in between the keys because in order to do #us, (winkey, u key, s key for standby) there has to be a slight pause in between each key

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01