Saturday, October 16, 2010

Choose Which Applications Launch on Startup with AutoHotkey [Windows Tip]

With a simple AutoHotkey script, you can tell your computer to launch different programs on startup with different combinations of the Caps Lock, Num Lock, and Scroll Lock functions turned on.

If you like to start up a bunch of programs when you log in, it can be a pain to click them all manually. And, if you have a few different combinations of programs you want to launch depending on the situation (say, a set of programs for work and a set of programs for personal use), you can't just set them to launch at login, since your computer only allows you to specify one set of login items.

Using the open source scripting language AutoHotkey, reader Scott created a script that checks the status of the Caps Lock, Num Lock, and Scroll Lock keys, and launches programs based on the combination of locks that are turned on. Just copy and paste this script into a new text file:

; Auto-Execute:GoTo CheckKeyboardStatus; On startup, this script checks the status of Numlock, Capslock, and Scrolllock.; Depending on the unique combination of these 3 variables, 1 of 8 commands will be executed.; The status is then reset (Numlock on, Capslock off, Scrolllock off);; To use this script, place it in your startup folder.; Then, every time you power up your computer, toggle the keyboard status; to specify which apps you want to run at startup.NumOffCapsOffScrollOff: ; Looks like: . . . Run Notepad.exe Run firefox.exeReturnNumOnCapsOffScrollOff: ; Looks like: o . . (Default) Run firefox.exeReturnNumOffCapsOnScrollOff: ; Looks like: . o . Run iexplore.exeReturnNumOnCapsOnScrollOff: ; Looks like: o o .ReturnNumOffCapsOffScrollOn: ; Looks like: . . oReturnNumOnCapsOffScrollOn: ; Looks like: o . oReturnNumOffCapsOnScrollOn: ; Looks like: . o oReturnNumOnCapsOnScrollOn: ; Looks like: o o oReturnCheckKeyboardStatus:; Read the keyboard status:Status

View the Original article

No comments:

Post a Comment