; Variables definition ; ----------------------------------------------------------------------------- EnvGet, userProfile, USERPROFILE Software := userProfile . "\Dropbox\software\" ; Launch or toggle program, http://lifehacker.com/5468862/create-a-shortcut-key-for-restoring-a-specific-window ; ----------------------------------------------------------------------------- ToggleWinMinimize(WindowTitle) { SetTitleMatchMode,2 DetectHiddenWindows, Off IfWinActive, %WindowTitle% WinMinimize, %WindowTitle% Else IfWinExist, %WindowTitle% { WinActivate } Return } RunOrActivateOrMinimizeProgram(Program, WorkingDir="", WindowSize="") { SplitPath Program, ExeFile Process, Exist, %ExeFile% PID = %ErrorLevel% if (PID = 0) { Run, %Program%, %WorkingDir%, %WindowSize% } else { SetTitleMatchMode,2 DetectHiddenWindows, Off IfWinActive, ahk_pid %PID% WinMinimize, ahk_pid %PID% Else IfWinExist, ahk_pid %PID% WinActivate, ahk_pid %PID% Return } } <^ 0 and ClickX > 0 and class != "MozillaWindowClass") { WinMinimize, A } Return ; Disable annoying keyboard keys ; ----------------------------------------------------------------------------- F1::Return CapsLock::Return Launch_Mail::Return Launch_App2::Return Browser_Home::Return ; Move window to other monitor / Maximize window / Close window ; ----------------------------------------------------------------------------- #a:: SendInput #+{Left} #q:: SendInput #{Up} <^ or surround selected text with it ; ----------------------------------------------------------------------------- <^<+.:: ClipboardOld = %Clipboard% clipboard = Send, ^c ClipboardNew = %Clipboard% Sleep, 50 If (ClipboardNew <> "") { SendInput {Left 7} SendRaw %ClipboardNew% } Else SendInput {Left 7} ClipBoard = %ClipboardOld% Return ; Increase/lower/mute volume ; ----------------------------------------------------------------------------- <^