SHOW:
|
|
- or go back to the newest paste.
| 1 | #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
| 2 | ; #Warn ; Enable warnings to assist with detecting common errors. | |
| 3 | #SingleInstance, Force | |
| 4 | SetTitleMatchMode, 2 | |
| 5 | ;====================================================================================================== | |
| 6 | ||
| 7 | ||
| 8 | ||
| 9 | ; ===================================================== | |
| 10 | ; PROGRAM SHORTCUTS | |
| 11 | ; ===================================================== | |
| 12 | ||
| 13 | #s::Run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" | |
| 14 | #+s::Run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -incognito | |
| 15 | #q::Run "C:\Program Files\Total Commander\TOTALCMD64.EXE" | |
| 16 | #w::Run "C:\Program Files\Microsoft Office\Office15\WINWORD.EXE" | |
| 17 | ;#c::Run calc | |
| 18 | #v::Run notepad | |
| 19 | #o::Run mspaint | |
| 20 | #F3::Run "C:\Program Files (x86)\Everything\Everything.exe" | |
| 21 | ^F12::Run "C:\Program Files\AutoHotkey\SciTE\SciTE.exe" | |
| 22 | ||
| 23 | ||
| 24 | ||
| 25 | ; ===================================================== | |
| 26 | ; INPUT SHORTCUTS | |
| 27 | ; ===================================================== | |
| 28 | ||
| 29 | ;Insert current Date | |
| 30 | :*:]d:: ; This hotstring replaces "]d" with the current date and time via the commands below. | |
| 31 | FormatTime, CurrentDateTime,, yy.MM.dd ; It will look like 12.10.28 | |
| 32 | SendInput %CurrentDateTime%. | |
| 33 | return | |
| 34 | ||
| 35 | :*:%dt:: | |
| 36 | FormatTime, CurrentDateTime,, d MMMM yyyy ; Date will look like "17 July 2014" | |
| 37 | SendInput %CurrentDateTime% | |
| 38 | return | |
| 39 | ||
| 40 | ||
| 41 | ; Email Signature | |
| 42 | [** REDACTED - PERSONAL INFO **] | |
| 43 | ||
| 44 | ||
| 45 | ;Duolingo - Spanish letters | |
| 46 | #IfWinActive Duolingo | |
| 47 | $!a::SendInput á | |
| 48 | $!e::SendInput é | |
| 49 | $!i::SendInput í | |
| 50 | $!o::SendInput ó | |
| 51 | $!u::SendInput ú | |
| 52 | $!+u::SendInput ü | |
| 53 | $!n::SendInput ñ | |
| 54 | #IfWinActive | |
| 55 | ||
| 56 | ||
| 57 | ; Cut/Paste Plain Text | |
| 58 | ||
| 59 | ^#v:: ; Text–only paste from ClipBoard | |
| 60 | Clip0 = %ClipBoardAll% | |
| 61 | ClipBoard = %ClipBoard% ; Convert to text | |
| 62 | Send ^v ; For best compatibility: SendPlay | |
| 63 | Sleep 50 ; Don't change clipboard while it is pasted! (Sleep > 0) | |
| 64 | ClipBoard = %Clip0% ; Restore original ClipBoard | |
| 65 | VarSetCapacity(Clip0, 0) ; Free memory | |
| 66 | Return | |
| 67 | ||
| 68 | ^#x:: | |
| 69 | ^#c:: ; Text-only cut/copy to ClipBoard | |
| 70 | Clip0 = %ClipBoardAll% | |
| 71 | ClipBoard = | |
| 72 | StringRight x,A_ThisHotKey,1 ; C or X | |
| 73 | Send ^%x% ; For best compatibility: SendPlay | |
| 74 | ClipWait 2 ; Wait for text, up to 2s | |
| 75 | If ErrorLevel | |
| 76 | ClipBoard = %Clip0% ; Restore original ClipBoard | |
| 77 | Else | |
| 78 | ClipBoard = %ClipBoard% ; Convert to text | |
| 79 | VarSetCapacity(Clip0, 0) ; Free memory | |
| 80 | Return | |
| 81 | ||
| 82 | ||
| 83 | ||
| 84 | ; Copy into CMD Prompt | |
| 85 | #IfWinActive ahk_class ConsoleWindowClass | |
| 86 | ^V::SendInput {Raw}%clipboard% return
| |
| 87 | return | |
| 88 | #IfWinActive | |
| 89 | ||
| 90 | ||
| 91 | ||
| 92 | ||
| 93 | ; Hide Input Method (Language) Icon in Notification Bar | |
| 94 | ^+Ins:: | |
| 95 | Run ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{05D7B0F4-2121-4EFF-BF6B-ED3F69B894D9}
| |
| 96 | WinWait, Notification Area Icons | |
| 97 | Send {Shift Down}{Tab 3}{Shift Up}{Enter}
| |
| 98 | WinWait, System Icons | |
| 99 | Send {Shift Down}{Tab 3}{Shift Up}{Down}{Esc}
| |
| 100 | WinClose, System Icons | |
| 101 | Return | |
| 102 | ||
| 103 | ||
| 104 | ||
| 105 | ||
| 106 | ; ===================================================== | |
| 107 | ; TURN OFF SCREEN/COMP | |
| 108 | ; ===================================================== | |
| 109 | ||
| 110 | #z::Run nircmd screensaver | |
| 111 | #^z:: | |
| 112 | Sleep 300 | |
| 113 | Run nircmd monitor off | |
| 114 | Return | |
| 115 | ||
| 116 | #^+!z::Run nircmd exitwin poweroff | |
| 117 | ||
| 118 | ||
| 119 | ; Always on Top | |
| 120 | ^!#Space::WinSet, AlwaysOnTop, toggle, A | |
| 121 | ||
| 122 | ||
| 123 | ; Lock Comp and Turn Off Screen | |
| 124 | #l:: | |
| 125 | {
| |
| 126 | Sleep, 200 | |
| 127 | DllCall("LockWorkStation")
| |
| 128 | Sleep, 200 | |
| 129 | SendMessage,0x112,0xF170,2,,Program Manager | |
| 130 | } | |
| 131 | ||
| 132 | ||
| 133 | ; ===================================================== | |
| 134 | ; DISABLE HOTKEYS TEMPORARILY | |
| 135 | ; ===================================================== | |
| 136 | ||
| 137 | ;Toggle disable all hotkeys and hotstrings | |
| 138 | :*?:````:: ; | |
| 139 | Suspend, Toggle | |
| 140 | Return | |
| 141 | ||
| 142 | ||
| 143 | ; Press the left control button twice to suspend all hotkeys temporarily for 3 seconds, then activate them again | |
| 144 | ~LControl:: ;Pressing button twice toggles whether we disable all hotkeys and hotstrings | |
| 145 | If (A_PriorHotKey = "~LControl" AND A_TimeSincePriorHotkey < 400) | |
| 146 | {
| |
| 147 | KeyWait LControl | |
| 148 | Suspend, On | |
| 149 | Sleep, 3000 | |
| 150 | Suspend, Off | |
| 151 | ;gosub, :*?:```` ;=Suspend, Toggle | |
| 152 | } | |
| 153 | Sleep 0 | |
| 154 | KeyWait LControl | |
| 155 | return | |
| 156 | ||
| 157 | ||
| 158 | ; RELEASE ALL CTRL/SHIFT MODIFIERS - USEFUL AFTER CERTAIN SCRIPTS SCREW UP | |
| 159 | ^+ScrollLock:: | |
| 160 | send {lctrl up}
| |
| 161 | send {lshift up}
| |
| 162 | send {rctrl up}
| |
| 163 | send {rshift up}
| |
| 164 | return | |
| 165 | ||
| 166 | ||
| 167 | ||
| 168 | ; ===================================================== | |
| 169 | ; SOUND STUFF | |
| 170 | ; ===================================================== | |
| 171 | ||
| 172 | ; Test Audio | |
| 173 | ^+F9::SoundPlay *-1 | |
| 174 | ||
| 175 | ;————————————— | |
| 176 | ;Toggle audio to use headphone jack or HDMI | |
| 177 | ;—————————————— | |
| 178 | ScrollLock:: | |
| 179 | toggle:=!toggle ;toggles up and down states. | |
| 180 | Run, mmsys.cpl | |
| 181 | WinWait,Sound ; Change "Sound" to the name of the window in your local language | |
| 182 | if toggle | |
| 183 | ControlSend,SysListView321,{Down 1} ; This number selects the matching audio device in the list, change it accordingly
| |
| 184 | Else | |
| 185 | ControlSend,SysListView321,{Down 6} ; This number selects the matching audio device in the list, change it accordingly
| |
| 186 | Sleep 100 | |
| 187 | ControlClick,&Set Default ; Change "&Set Default" to the name of the button in your local language | |
| 188 | ControlClick,OK | |
| 189 | return | |
| 190 | ||
| 191 | ||
| 192 | ||
| 193 | ||
| 194 | ; ===================================================== | |
| 195 | ; MISC | |
| 196 | ; ===================================================== | |
| 197 | ||
| 198 | ;Drag window size across | |
| 199 | ^|:: SendEvent {Click 798, 717, down}{click 964, 717, up}
| |
| 200 | ||
| 201 | ||
| 202 | ; Twitch Chat for Desktop Streamer Program | |
| 203 | ^PgUp:: | |
| 204 | if WinExist("ahk_class WindowsForms10.Window.8.app.0.2bf8098_r11_ad1")
| |
| 205 | {
| |
| 206 | WinActivate | |
| 207 | MouseClick, left, 411,310 | |
| 208 | Sleep 3000 | |
| 209 | Send !d | |
| 210 | Send ^c | |
| 211 | Sleep 100 | |
| 212 | Send ^w | |
| 213 | StringReplace, clipboard, clipboard, http://www.twitch.tv/, , All | |
| 214 | Sleep 200 | |
| 215 | Run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app=http://www.twitch.tv/chat/embed?channel=%clipboard%&popout_chat=true | |
| 216 | Sleep 200 | |
| 217 | WinActivate ahk_class QWidget | |
| 218 | Return | |
| 219 | } | |
| 220 | Return | |
| 221 | ||
| 222 | ||
| 223 | ||
| 224 | ; ===================================================== | |
| 225 | ; GAMING | |
| 226 | ; ===================================================== | |
| 227 | ||
| 228 | ||
| 229 | ; XPADDER SCRIPTS | |
| 230 | ^+] Up::Process, Close, XPadder.exe ; Press Back+Start+B on controller to Close XPadder | |
| 231 | ;^+[ Up::Run, "C:\Misc Utilities\XPadder\Xpadder.exe" | |
| 232 | ||
| 233 | Joy5 & Joy1:: | |
| 234 | If GetKeyState("Joy9","P") ; Press LB+LJoystick+A to restart XPadder
| |
| 235 | Run, "C:\Misc Utilities\XPadder\Xpadder.exe" | |
| 236 | return | |
| 237 | ||
| 238 | ||
| 239 | ||
| 240 | ||
| 241 | ||
| 242 | #IfWinActive ahk_class Skyrim | |
| 243 | MButton::Send E | |
| 244 | ||
| 245 | ||
| 246 | ; Civ 5: Mouse3=Enter | |
| 247 | #IfWinActive ahk_class WinClass_FXS | |
| 248 | MButton:: Send {Enter}
| |
| 249 | ||
| 250 | ||
| 251 | ; Fallout - NV | |
| 252 | #IfWinActive ahk_class Fallout: New Vegas | |
| 253 | MButton:: Send q | |
| 254 | #IfWinActive | |
| 255 | ||
| 256 | ||
| 257 | ;Assassin's Creed 4 Auto Walk, (Previously Borderlands 2 - LaunchUnrealUWindowsClient) | |
| 258 | #IfWinActive, ahk_class ScimitarEngineWindowClass | |
| 259 | ;;autorun Press X | |
| 260 | ~*x:: | |
| 261 | If GetKeyState("w")
| |
| 262 | Send {Shift up}{w Up}
| |
| 263 | Else | |
| 264 | Send {Shift down}{w Down}
| |
| 265 | Return | |
| 266 | #IfWinActive | |
| 267 | ||
| 268 | ||
| 269 | ; Project 64 - Full Screen | |
| 270 | #IfWinActive ahk_class Project64 Version 1.6 | |
| 271 | Joy9::Send !{Enter}
| |
| 272 | Return | |
| 273 | #IfWinActive | |
| 274 | ||
| 275 | ||
| 276 | ; AutoSell Resources - AoE2 | |
| 277 | #IfWinActive, ahk_class Age of Empires II: HD Edition | |
| 278 | \:: | |
| 279 | Loop | |
| 280 | {
| |
| 281 | GetKeyState, Check, \, P | |
| 282 | If Check = U | |
| 283 | Break | |
| 284 | Send +{LButton}
| |
| 285 | sleep 20 ; Adjust if needed | |
| 286 | } | |
| 287 | Return | |
| 288 | #IfWinActive | |
| 289 | ||
| 290 | ||
| 291 | ; Close Overwolf | |
| 292 | !^#\:: | |
| 293 | CoordMode, Mouse, Screen | |
| 294 | MouseGetPos, x,y | |
| 295 | MouseClick, left, 0, 856 | |
| 296 | Sleep 100 | |
| 297 | MouseClick, left, 17, 822 | |
| 298 | MouseMove, x,y | |
| 299 | CoordMode, Mouse, Relative | |
| 300 | return |