Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ; Enable warnings to assist with detecting common errors.
- #SingleInstance, Force
- SetTitleMatchMode, 2
- ;======================================================================================================
- ; =====================================================
- ; PROGRAM SHORTCUTS
- ; =====================================================
- #s::Run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
- #+s::Run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -incognito
- #q::Run "C:\Program Files\Total Commander\TOTALCMD64.EXE"
- #w::Run "C:\Program Files\Microsoft Office\Office15\WINWORD.EXE"
- ;#c::Run calc
- #v::Run notepad
- #o::Run mspaint
- #F3::Run "C:\Program Files (x86)\Everything\Everything.exe"
- ^F12::Run "C:\Program Files\AutoHotkey\SciTE\SciTE.exe"
- ; =====================================================
- ; INPUT SHORTCUTS
- ; =====================================================
- ;Insert current Date
- :*:]d:: ; This hotstring replaces "]d" with the current date and time via the commands below.
- FormatTime, CurrentDateTime,, yy.MM.dd ; It will look like 12.10.28
- SendInput %CurrentDateTime%.
- return
- :*:%dt::
- FormatTime, CurrentDateTime,, d MMMM yyyy ; Date will look like "17 July 2014"
- SendInput %CurrentDateTime%
- return
- ; Email Signature
- [** REDACTED - PERSONAL INFO **]
- ;Duolingo - Spanish letters
- #IfWinActive Duolingo
- $!a::SendInput á
- $!e::SendInput é
- $!i::SendInput í
- $!o::SendInput ó
- $!u::SendInput ú
- $!+u::SendInput ü
- $!n::SendInput ñ
- #IfWinActive
- ; Cut/Paste Plain Text
- ^#v:: ; Text–only paste from ClipBoard
- Clip0 = %ClipBoardAll%
- ClipBoard = %ClipBoard% ; Convert to text
- Send ^v ; For best compatibility: SendPlay
- Sleep 50 ; Don't change clipboard while it is pasted! (Sleep > 0)
- ClipBoard = %Clip0% ; Restore original ClipBoard
- VarSetCapacity(Clip0, 0) ; Free memory
- Return
- ^#x::
- ^#c:: ; Text-only cut/copy to ClipBoard
- Clip0 = %ClipBoardAll%
- ClipBoard =
- StringRight x,A_ThisHotKey,1 ; C or X
- Send ^%x% ; For best compatibility: SendPlay
- ClipWait 2 ; Wait for text, up to 2s
- If ErrorLevel
- ClipBoard = %Clip0% ; Restore original ClipBoard
- Else
- ClipBoard = %ClipBoard% ; Convert to text
- VarSetCapacity(Clip0, 0) ; Free memory
- Return
- ; Copy into CMD Prompt
- #IfWinActive ahk_class ConsoleWindowClass
- ^V::SendInput {Raw}%clipboard% return
- return
- #IfWinActive
- ; Hide Input Method (Language) Icon in Notification Bar
- ^+Ins::
- Run ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{05D7B0F4-2121-4EFF-BF6B-ED3F69B894D9}
- WinWait, Notification Area Icons
- Send {Shift Down}{Tab 3}{Shift Up}{Enter}
- WinWait, System Icons
- Send {Shift Down}{Tab 3}{Shift Up}{Down}{Esc}
- WinClose, System Icons
- Return
- ; =====================================================
- ; TURN OFF SCREEN/COMP
- ; =====================================================
- #z::Run nircmd screensaver
- #^z::
- Sleep 300
- Run nircmd monitor off
- Return
- #^+!z::Run nircmd exitwin poweroff
- ; Always on Top
- ^!#Space::WinSet, AlwaysOnTop, toggle, A
- ; Lock Comp and Turn Off Screen
- #l::
- {
- Sleep, 200
- DllCall("LockWorkStation")
- Sleep, 200
- SendMessage,0x112,0xF170,2,,Program Manager
- }
- ; =====================================================
- ; DISABLE HOTKEYS TEMPORARILY
- ; =====================================================
- ;Toggle disable all hotkeys and hotstrings
- :*?:````:: ;
- Suspend, Toggle
- Return
- ; Press the left control button twice to suspend all hotkeys temporarily for 3 seconds, then activate them again
- ~LControl:: ;Pressing button twice toggles whether we disable all hotkeys and hotstrings
- If (A_PriorHotKey = "~LControl" AND A_TimeSincePriorHotkey < 400)
- {
- KeyWait LControl
- Suspend, On
- Sleep, 3000
- Suspend, Off
- ;gosub, :*?:```` ;=Suspend, Toggle
- }
- Sleep 0
- KeyWait LControl
- return
- ; RELEASE ALL CTRL/SHIFT MODIFIERS - USEFUL AFTER CERTAIN SCRIPTS SCREW UP
- ^+ScrollLock::
- send {lctrl up}
- send {lshift up}
- send {rctrl up}
- send {rshift up}
- return
- ; =====================================================
- ; SOUND STUFF
- ; =====================================================
- ; Test Audio
- ^+F9::SoundPlay *-1
- ;—————————————
- ;Toggle audio to use headphone jack or HDMI
- ;——————————————
- ScrollLock::
- toggle:=!toggle ;toggles up and down states.
- Run, mmsys.cpl
- WinWait,Sound ; Change "Sound" to the name of the window in your local language
- if toggle
- ControlSend,SysListView321,{Down 1} ; This number selects the matching audio device in the list, change it accordingly
- Else
- ControlSend,SysListView321,{Down 6} ; This number selects the matching audio device in the list, change it accordingly
- Sleep 100
- ControlClick,&Set Default ; Change "&Set Default" to the name of the button in your local language
- ControlClick,OK
- return
- ; =====================================================
- ; MISC
- ; =====================================================
- ;Drag window size across
- ^|:: SendEvent {Click 798, 717, down}{click 964, 717, up}
- ; Twitch Chat for Desktop Streamer Program
- ^PgUp::
- if WinExist("ahk_class WindowsForms10.Window.8.app.0.2bf8098_r11_ad1")
- {
- WinActivate
- MouseClick, left, 411,310
- Sleep 3000
- Send !d
- Send ^c
- Sleep 100
- Send ^w
- StringReplace, clipboard, clipboard, http://www.twitch.tv/, , All
- Sleep 200
- Run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app=http://www.twitch.tv/chat/embed?channel=%clipboard%&popout_chat=true
- Sleep 200
- WinActivate ahk_class QWidget
- Return
- }
- Return
- ; =====================================================
- ; GAMING
- ; =====================================================
- ; XPADDER SCRIPTS
- ^+] Up::Process, Close, XPadder.exe ; Press Back+Start+B on controller to Close XPadder
- ;^+[ Up::Run, "C:\Misc Utilities\XPadder\Xpadder.exe"
- Joy5 & Joy1::
- If GetKeyState("Joy9","P") ; Press LB+LJoystick+A to restart XPadder
- Run, "C:\Misc Utilities\XPadder\Xpadder.exe"
- return
- #IfWinActive ahk_class Skyrim
- MButton::Send E
- ; Civ 5: Mouse3=Enter
- #IfWinActive ahk_class WinClass_FXS
- MButton:: Send {Enter}
- ; Fallout - NV
- #IfWinActive ahk_class Fallout: New Vegas
- MButton:: Send q
- #IfWinActive
- ;Assassin's Creed 4 Auto Walk, (Previously Borderlands 2 - LaunchUnrealUWindowsClient)
- #IfWinActive, ahk_class ScimitarEngineWindowClass
- ;;autorun Press X
- ~*x::
- If GetKeyState("w")
- Send {Shift up}{w Up}
- Else
- Send {Shift down}{w Down}
- Return
- #IfWinActive
- ; Project 64 - Full Screen
- #IfWinActive ahk_class Project64 Version 1.6
- Joy9::Send !{Enter}
- Return
- #IfWinActive
- ; AutoSell Resources - AoE2
- #IfWinActive, ahk_class Age of Empires II: HD Edition
- \::
- Loop
- {
- GetKeyState, Check, \, P
- If Check = U
- Break
- Send +{LButton}
- sleep 20 ; Adjust if needed
- }
- Return
- #IfWinActive
- ; Close Overwolf
- !^#\::
- CoordMode, Mouse, Screen
- MouseGetPos, x,y
- MouseClick, left, 0, 856
- Sleep 100
- MouseClick, left, 17, 822
- MouseMove, x,y
- CoordMode, Mouse, Relative
- return
Advertisement
Add Comment
Please, Sign In to add comment