autohotkey_recipes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
autohotkey_recipes [2012/07/28 07:47] – [FoxIt] tkbletsc | autohotkey_recipes [2017/09/17 18:22] – [Winkey shortcut overrides] tkbletsc | ||
---|---|---|---|
Line 7: | Line 7: | ||
====== Recipes ====== | ====== Recipes ====== | ||
- | Below are some useful recipes. | + | Below are some useful recipes. |
+ | * [[Using AutoHotKey to map keys on the Amtelco KB163 Unified Keyboard]]. | ||
+ | * [[Using AutoHotkey to make a second mouse into a multimedia control]] | ||
===== General ===== | ===== General ===== | ||
Line 25: | Line 27: | ||
; Win+M = toggle mute | ; Win+M = toggle mute | ||
#m::Send {Volume_Mute} | #m::Send {Volume_Mute} | ||
+ | </ | ||
+ | |||
+ | ===== Hold down any key ===== | ||
+ | < | ||
+ | ; do right win key + whatever to hold that key down (if it's listed below) | ||
+ | ># | ||
+ | ># | ||
+ | ># | ||
+ | ># | ||
+ | ># | ||
+ | ># | ||
+ | ># | ||
+ | ># | ||
+ | ># | ||
+ | </ | ||
+ | |||
+ | ===== Map gamepad buttons to winamp controls ===== | ||
+ | All the function gunk around Joy2 and Joy3 is for keyboard auto-repeat of Win+A and Win+S (which I map to winamp volume control elsewhere). | ||
+ | < | ||
+ | ; winamp control (if winamp is running) | ||
+ | #If WinExist(" | ||
+ | Joy1::Send {Media_Play_Pause} | ||
+ | Joy4::Send {Media_Stop} | ||
+ | Joy6::Send {Media_Next} | ||
+ | Joy8::Send {Media_Prev} | ||
+ | |||
+ | Joy2:: | ||
+ | Send {LWin down}{s down} | ||
+ | SetTimer, WaitForJoy2, | ||
+ | return | ||
+ | |||
+ | WaitForJoy2: | ||
+ | if not GetKeyState(" | ||
+ | { | ||
+ | Send {LWin up}{s up} ; Release the spacebar. | ||
+ | SetTimer, WaitForJoy2, | ||
+ | return | ||
+ | } | ||
+ | ; Since above didn't " | ||
+ | Send {LWin down}{s down} ; Send another Spacebar keystroke. | ||
+ | return | ||
+ | |||
+ | Joy3:: | ||
+ | Send {LWin down}{a down} | ||
+ | SetTimer, WaitForJoy3, | ||
+ | return | ||
+ | |||
+ | WaitForJoy3: | ||
+ | if not GetKeyState(" | ||
+ | { | ||
+ | Send {LWin up}{a up} ; Release the spacebar. | ||
+ | SetTimer, WaitForJoy3, | ||
+ | return | ||
+ | } | ||
+ | ; Since above didn't " | ||
+ | Send {LWin down}{a down} ; Send another Spacebar keystroke. | ||
+ | return | ||
+ | #If ; EndIf | ||
+ | </ | ||
+ | |||
+ | ===== Make the top edge of the main monitor " | ||
+ | If you have a second monitor //above// the main one, this script will help you still be able to click stuff at the top of the screen without accidentally wandering into the upper monitor. | ||
+ | < | ||
+ | SetupClipCheck() ; enable the mouse confinement system (defined below) | ||
+ | |||
+ | ; get access to the winapi ClipCursor function, which limits cursor boundaries | ||
+ | ClipCursor( Confine=True, | ||
+ | { | ||
+ | | ||
+ | | ||
+ | } | ||
+ | |||
+ | ; count the number of loop iterations the mouse has been near the top and un-confine the mouse if there' | ||
+ | SetupClipCheck() { | ||
+ | | ||
+ | | ||
+ | } | ||
+ | |||
+ | top_tick_count := 0 | ||
+ | ClipCheck: | ||
+ | | ||
+ | | ||
+ | ; | ||
+ | |||
+ | If (y < 10) { | ||
+ | | ||
+ | } Else { | ||
+ | | ||
+ | } | ||
+ | |||
+ | if (top_tick_count> | ||
+ | | ||
+ | } Else { | ||
+ | | ||
+ | } | ||
+ | | ||
+ | </ | ||
+ | |||
+ | ===== Extended mouse buttons mapped to media control ===== | ||
+ | < | ||
+ | XButton2:: | ||
+ | XButton1:: | ||
+ | </ | ||
+ | |||
+ | ===== Mouse click spam ===== | ||
+ | Press F7 to toggle auto-clicking over and over as fast as possible. | ||
+ | < | ||
+ | i:=0 | ||
+ | F7:: | ||
+ | |||
+ | Spam: | ||
+ | Click | ||
+ | Send {LButton} | ||
+ | return | ||
</ | </ | ||
Line 31: | Line 147: | ||
< | < | ||
; WinAmp+Launchy remaps | ; WinAmp+Launchy remaps | ||
- | #x::#^x | + | #z::Media_Prev |
- | #b::#^b | + | #x:: |
+ | #c::Media_Play_Pause | ||
+ | # | ||
+ | #b:: | ||
# | # | ||
+ | |||
+ | ; old simple winamp remaps -- the newer ones above let it work for non-winamps, | ||
+ | ;#x::#^x | ||
+ | ;#b::#^b | ||
</ | </ | ||
===== Auto mouse ===== | ===== Auto mouse ===== | ||
Line 79: | Line 202: | ||
# | # | ||
MButton:: | MButton:: | ||
- | SetTimer DoClick, | + | SetTimer DoClick, |
- | SoundBeep 880,50 | + | SoundBeep 880,50 |
- | return | + | return |
MButton up:: | MButton up:: | ||
- | SetTimer DoClick, | + | SetTimer DoClick, |
- | SoundBeep 440,50 | + | SoundBeep 440,50 |
- | return | + | return |
# | # | ||
</ | </ | ||
+ | |||
===== Suppress F1 in Explorer, Word, and Excel ===== | ===== Suppress F1 in Explorer, Word, and Excel ===== |
autohotkey_recipes.txt · Last modified: 2017/10/23 20:00 by tkbletsc