#MaxHotkeysPerInterval 200 #NoEnv SendMode Input SetWinDelay, 0 ;suspend $ScrollLock::Suspend ;macros ::lenny::( ͡° ͜ʖ ͡°) ::shrug::¯\_(ツ)_/¯ ;global hotkeys $^+p:: if !winactive("ahk_exe Code.exe") WinActivate, ahk_exe Code.exe SendInput ^+p return $^':: if !winactive("ahk_exe Code.exe") WinActivate, ahk_exe Code.exe SendInput ^' return $^t:: if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Photoshop.exe") WinActivate, ahk_exe chrome.exe SendInput ^t return $^k:: if !winactive("ahk_exe Discord.exe") And !winactive("ahk_exe Code.exe") WinActivate, ahk_exe Discord.exe SendInput ^k return ;disabled hotkeys *Ins:: #D:: #Up:: ^#Down:: *NumpadIns::Return ;simplified hotkeys #Left::^#Left #Right::^#Right ;always on top LWIN & MButton:: MouseGetPos,,, WinUMID Winset, Alwaysontop, , ahk_id %WinUMID% return ;titlebar visiblity ;-Caption LWIN & LButton:: MouseGetPos,,, WinUMID ;WinSet, Style, -0x40000, A aux := DllCall("GetMenu", ptr, ahk_id WinUMID) if(aux != 0) { hMenu%WinUMID% := aux DllCall("SetMenu", ptr, ahk_id WinUMID, ptr, 0) } WinGet, Style, Style, ahk_id %WinUMID% if(Style & 0xC00000) { ;WinGet, maximized, MinMax, ahk_id %WinUMID% ;WinRestore, ahk_id %WinUMID% WinSet, Style, -0xC00000, ahk_id %WinUMID% ;WinSet, Style, -0x840000, A ;WinHide, A ;WinShow, A ;WinSet, Style, -0x1c00000, ;CAPTION|DLGFRAME|MAXIMIZE ;WinGetPos, X, Y, Width, Height, ahk_id %WinUMID% ;WinMove, ahk_id %WinUMID%,, X+1, Y, Width-2, Height-1 ;WinMove, ahk_id %WinUMID%,, X, Y, Width, Height } return ;+Caption LWIN & RButton:: MouseGetPos,,, WinUMID ;WinGetPos, X, Y, Width, Height, A ;WinSet, Style, +0x40000, A if(hMenu%WinUMID% != 0) DllCall("SetMenu", ptr, ahk_id WinUMID, ptr, hMenu%WinUMID%) WinGet, Style, Style, ahk_id %WinUMID% if(!(Style & 0xC00000)) { WinSet, Style, +0xC00000, ahk_id %WinUMID% ;WinSet, Style, +0x840000, A ;WinHide, A ;WinShow, A WinGet, maximized, MinMax, ahk_id %WinUMID% if(!maximized) WinMove, ahk_id %WinUMID%,, X+0.5, Y, Width+0.5, Height+0.5 ;WinSet, Style, +0x1c00000, ;CAPTION|DLGFRAME|MAXIMIZE } return ;Chrome tabs ;~WheelUp:: ;if winactive("ahk_class Chrome_WidgetWin_1") ;{ ; MouseGetPos, xchrome, ychrome ; if (ychrome < 92) ; { ; Send, ^+{Tab} ; } ;} ;return ;~WheelDown:: ;if winactive("ahk_class Chrome_WidgetWin_1") ;{ ; MouseGetPos, xchrome, ychrome ; if (ychrome < 92) ; { ; Send, ^{Tab} ; } ;} ;return ;print screen PrintScreen:: Send, #+s ;Run snippingtool ;sleep, 500 ;Send, !n return ;auto reload ~^s:: WinGetActiveTitle, Reload If InStr(Reload, ".ahk") Reload Progress, Off Return ;skype #SingleInstance force #IfWinActive ahk_class tSkMainForm ConversationUp() { Send, {AltDown}2{AltUp} ; Sleep, 1 Send, {Up}{Enter} return } ConversationDown() { Send, {AltDown}2{AltUp} ; Sleep, 1 Send, {Down}{Enter} return } Search() { Send, ^+!{F5} } ^F::Search() ;Ctrl+Down move one conversation down ^Down::ConversationDown() ;Ctrl+Up move one conversation up ^Up::ConversationUp() ;Ctrl+Tab move one conversation down ^Tab::ConversationDown() ;Ctrl+Shift+Tab move one conversation up ^+Tab::ConversationUp()