Showing posts with label Tutorials. Show all posts
Showing posts with label Tutorials. Show all posts

2/09/2011

Launching a program, document, URL, or shortcut

The Run command is used to launch a program, document, url ot shortcut. Now i'll show you some common examples:


Run Skype
Run C:\My Documents\review4.doc
Run C:\My Documents\My Shortcut.lnk
Run www.google.bg
Run mailto:example@exampledomain.com
 
A hotkey can be assigned to any of the above examples by including a hotkey label (I'll make a special post about hotkey label). In the first example below, the assigned hotkey is Win+N, while in the second it is Control+Alt+C:

#n::Run Notepad
^!c::Run calc.exe
 
If the program/document/url or shortcut is not integrated
with the system,
specify its full path to get it to launch:
 
 Run %A_ProgramFiles%\Skype\Skype.exe

Basic

Working with AutoHotkey is not hard. In this tutorial i will show you how to create an example script. First you need to Download and install AutoHotkey. Then open your text browser and type example:
#space::Run www.autohotkey-tutorials.blogspot.com
and save ensuring that it ends in .ahk. For example: Page.ahk
In the line above, the first character "#" stands for the Windows key; so #space means holding down the Windows key then pressing the spacebar to activate the hotkey. The :: means that the subsequent command should be executed whenever this hotkey is pressed, in this case to go to the Google web site. To try out this script, continue as follows:
  1. Save and close the file.
  2. Double-click the file to launch it. A new icon appears in the taskbar notification area.
  3. Hold down the Windows key and press the spacebar. A web page opens in the default browser.
  4. To exit or edit the script, right-click the green "H" icon in the taskbar notification area. Or just type at the end of script: 
Enter::Pause
this will just pause the script; if you press enter again, it will unpause.

2/08/2011

More About Hotkeys

AutoHotkey unleashes the full potential of your keyboard, joystick, and mouse. For example, in addition to the typical Control, Alt, and Shift modifiers, you can use the Windows key and the Capslock key as modifiers. In fact, you can make any key or mouse button act as a modifier. For these and other capabilities, see Advanced Hotkeys.