Now that you've got an idea of how to create hotkeys the simple way, we'll move on to slightly more advanced hotkey creation. First, we'll create a simple hotkey that will open Lifehacker when we press Windows-l (who wouldn't rather read Lifehacker than lock their desktop?). Quite simply, it looks like this: #l::Run, http://lifehacker.com/ In this example, we're using the Run command, which can take any target—from web URLs to files on your hard drive—and, quite simply, open them. As a result, creating a keyboard shortcut to launch anything at all is a breeze. You can launch any program, document, or web page with a simple shortcut of your choosing. If you were creating an iTunes shortcut with Windows-i (where the Windows key equals the pound sign [#]), for example, it might look something like this: #i::Run,%A_ProgramFiles%\iTunes\iTunes.exe You'll noticed I introduced another concept here: variables. The variable %A_ProgramFiles% tells AutoHotkey to look in my default Program Files directory—in my case, "C:\Program Files". I could have just made the command Run, C:\Program Files\iTunes\iTunes.exe, but using the variable means that—assuming I've got iTunes installed—the same shortcut will work on other computers that have iTunes installed to the default directory, even if their home drive is D:\ or F:\. For more on variables, check out AutoHotkey's introduction to variables, along with their list of built-in variables (like %A_ProgramFiles%).
Wednesday, March 12, 2008
Taking Hotkeys a Step Further
·
Labels: General
Subscribe to:
Post Comments (Atom)
Check out my new blog:
Translation
Recent Posts
Who's Online?
Pageviews Today
About Me
嗨,我是花,居住在印度兴奋的Windows,Linux中国的外籍人士和所有高科技的东西
Receive updates for free
Labels
- Tips 'n' Tricks (171)
- Windows Vista (105)
- Website/ Blogging (91)
- General (88)
- Windows XP (84)
- Internet (59)
- Windows 7 (54)
- Software (43)
- Mobile-Tips and Tricks (35)
- Review (28)
- Security (28)
- SEO Tools (25)
- iPhone (17)
- Linux (14)
- Windows Mobile (14)
- mac (13)
- Mobile (12)
- MS Office (7)
- Hardware (6)
- Windows 98 (6)
- Zune (6)
- Games (4)
- Mobile Reviews (3)
- Disclaimer (2)
Blog Archive
- June (2)
- May (2)
- August (2)
- July (1)
- June (1)
- May (2)
- April (4)
- March (4)
- February (1)
- December (2)
- November (1)
- November (1)
- June (2)
- May (28)
- April (54)
- March (83)
- February (60)
- January (57)
- December (48)
- November (17)
- October (28)
- September (22)
- August (19)
- July (34)
- June (59)
- May (1)
- April (5)
- March (22)
- February (5)
- January (31)
0 comments:
Post a Comment