Skip to content

Instantly share code, notes, and snippets.

@Logerfo
Last active August 11, 2024 08:24
Show Gist options
  • Save Logerfo/45d0009ad12f7ccd9015713cc9a60bb9 to your computer and use it in GitHub Desktop.
Save Logerfo/45d0009ad12f7ccd9015713cc9a60bb9 to your computer and use it in GitHub Desktop.

Revisions

  1. Logerfo revised this gist Mar 10, 2020. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -46,6 +46,12 @@ if winactive("ahk_exe Telegram.exe")
    SendInput {ESC}
    return
    }
    }
    if winactive("ahk_exe Teams.exe")
    {
    SendInput ^e
    return
    }
    if !winactive("ahk_exe Discord.exe") And !winactive("ahk_exe Code.exe")
    WinActivate, ahk_exe Discord.exe
    SendInput ^k
  2. Logerfo revised this gist Oct 15, 2019. No changes.
  3. Logerfo revised this gist Oct 15, 2019. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -29,14 +29,14 @@ else
    return

    $^t::
    if !winactive("ahk_exe Photoshop.exe") And !winactive("ahk_exe Brave.exe")
    WinActivate, ahk_exe Brave.exe
    if !winactive("ahk_exe Photoshop.exe") And !winactive("ahk_exe chrome.exe")
    WinActivate, ahk_exe chrome.exe
    SendInput ^t
    return

    $^+t::
    if !winactive("ahk_exe Terminus.exe") And !winactive("ahk_exe Code.exe") And !winactive("ahk_exe Brave.exe")
    WinActivate, ahk_exe Brave.exe
    if !winactive("ahk_exe Terminus.exe") And !winactive("ahk_exe Code.exe") And !winactive("ahk_exe chrome.exe")
    WinActivate, ahk_exe chrome.exe
    SendInput ^+t
    return

  4. Logerfo revised this gist Oct 11, 2019. No changes.
  5. Logerfo revised this gist Oct 11, 2019. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -29,14 +29,14 @@ else
    return

    $^t::
    if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Photoshop.exe") And !winactive("ahk_exe Brave.exe")
    WinActivate, ahk_exe chrome.exe
    if !winactive("ahk_exe Photoshop.exe") And !winactive("ahk_exe Brave.exe")
    WinActivate, ahk_exe Brave.exe
    SendInput ^t
    return

    $^+t::
    if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Terminus.exe") And !winactive("ahk_exe Code.exe") And !winactive("ahk_exe Brave.exe")
    WinActivate, ahk_exe chrome.exe
    if !winactive("ahk_exe Terminus.exe") And !winactive("ahk_exe Code.exe") And !winactive("ahk_exe Brave.exe")
    WinActivate, ahk_exe Brave.exe
    SendInput ^+t
    return

  6. Logerfo revised this gist Oct 10, 2019. No changes.
  7. Logerfo revised this gist Oct 10, 2019. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -22,20 +22,20 @@ SendInput ^+p
    return

    $^'::
    if !winactive("ahk_exe Code.exe")
    if !winactive("ahk_exe Code.exe") And !winactive("ahk_exe gimp-2.10.exe")
    WinActivate, ahk_exe Code.exe
    else
    SendInput ^'
    return

    $^t::
    if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Photoshop.exe")
    if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Photoshop.exe") And !winactive("ahk_exe Brave.exe")
    WinActivate, ahk_exe chrome.exe
    SendInput ^t
    return

    $^+t::
    if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Terminus.exe") And !winactive("ahk_exe Code.exe")
    if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Terminus.exe") And !winactive("ahk_exe Code.exe") And !winactive("ahk_exe Brave.exe")
    WinActivate, ahk_exe chrome.exe
    SendInput ^+t
    return
  8. Logerfo revised this gist Aug 20, 2019. No changes.
  9. Logerfo revised this gist Aug 20, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -58,6 +58,8 @@ return
    #Down::
    ^#Down::
    *NumpadIns::
    *PgUp::
    *PgDn::
    $!Space::Return

    Control & WheelDown::
  10. Logerfo revised this gist Apr 12, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ SendInput ^t
    return

    $^+t::
    if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Terminus.exe")
    if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Terminus.exe") And !winactive("ahk_exe Code.exe")
    WinActivate, ahk_exe chrome.exe
    SendInput ^+t
    return
  11. Logerfo revised this gist Feb 20, 2019. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -4,12 +4,16 @@ SendMode Input
    SetWinDelay, 0

    ;suspend
    $ScrollLock::Suspend
    *ScrollLock::Suspend

    ;macros
    ::lenny::( ͡° ͜ʖ ͡°)
    ::shrug::¯\_(ツ)_/¯

    ;$F2::SendInput {Del}
    ;$+F2::SendInput +{Del}
    ;$^F2::SendInput ^{Del}

    ;global hotkeys
    $^+p::
    if !winactive("ahk_exe Code.exe")
    @@ -31,7 +35,7 @@ SendInput ^t
    return

    $^+t::
    if !winactive("ahk_exe chrome.exe")
    if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Terminus.exe")
    WinActivate, ahk_exe chrome.exe
    SendInput ^+t
    return
  12. Logerfo revised this gist Feb 11, 2019. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -30,6 +30,12 @@ if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Photoshop.exe")
    SendInput ^t
    return

    $^+t::
    if !winactive("ahk_exe chrome.exe")
    WinActivate, ahk_exe chrome.exe
    SendInput ^+t
    return

    $^k::
    if winactive("ahk_exe Telegram.exe")
    {
  13. Logerfo revised this gist Feb 5, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -45,6 +45,7 @@ return
    *Ins::
    #D::
    #Up::
    #Down::
    ^#Down::
    *NumpadIns::
    $!Space::Return
  14. Logerfo revised this gist Dec 18, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -62,6 +62,8 @@ return
    ;simplified hotkeys
    #Left::^#Left
    #Right::^#Right
    LWIN & WheelUp::^#Left
    LWIN & WheelDown::^#Right

    ;avoided hotkeys
    ^+,::SendInput ^,
  15. Logerfo revised this gist Dec 12, 2018. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -49,14 +49,12 @@ return
    *NumpadIns::
    $!Space::Return

    LControl & WheelDown::
    RControl & WheelDown::
    Control & WheelDown::
    if !winactive("ahk_exe devenv.exe")
    SendInput ^{WheelDown}
    return

    LControl & WheelUp::
    RControl & WheelUp::
    Control & WheelUp::
    if !winactive("ahk_exe devenv.exe")
    SendInput ^{WheelUp}
    return
  16. Logerfo revised this gist Dec 12, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -50,11 +50,13 @@ return
    $!Space::Return

    LControl & WheelDown::
    RControl & WheelDown::
    if !winactive("ahk_exe devenv.exe")
    SendInput ^{WheelDown}
    return

    LControl & WheelUp::
    RControl & WheelUp::
    if !winactive("ahk_exe devenv.exe")
    SendInput ^{WheelUp}
    return
  17. Logerfo revised this gist Dec 10, 2018. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -31,6 +31,11 @@ SendInput ^t
    return

    $^k::
    if winactive("ahk_exe Telegram.exe")
    {
    SendInput {ESC}
    return
    }
    if !winactive("ahk_exe Discord.exe") And !winactive("ahk_exe Code.exe")
    WinActivate, ahk_exe Discord.exe
    SendInput ^k
  18. Logerfo revised this gist Nov 29, 2018. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,8 @@ return
    $^'::
    if !winactive("ahk_exe Code.exe")
    WinActivate, ahk_exe Code.exe
    SendInput ^'
    else
    SendInput ^'
    return

    $^t::
  19. Logerfo revised this gist Nov 22, 2018. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -43,6 +43,16 @@ return
    *NumpadIns::
    $!Space::Return

    LControl & WheelDown::
    if !winactive("ahk_exe devenv.exe")
    SendInput ^{WheelDown}
    return

    LControl & WheelUp::
    if !winactive("ahk_exe devenv.exe")
    SendInput ^{WheelUp}
    return

    ;simplified hotkeys
    #Left::^#Left
    #Right::^#Right
  20. Logerfo revised this gist Nov 19, 2018. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -40,12 +40,17 @@ return
    #D::
    #Up::
    ^#Down::
    *NumpadIns::Return
    *NumpadIns::
    $!Space::Return

    ;simplified hotkeys
    #Left::^#Left
    #Right::^#Right

    ;avoided hotkeys
    ^+,::SendInput ^,
    ^+.::SendInput ^.

    ;always on top
    LWIN & MButton::
    MouseGetPos,,, WinUMID
  21. Logerfo revised this gist Oct 15, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,7 @@ SendInput ^'
    return

    $^t::
    if !winactive("ahk_exe chrome.exe")
    if !winactive("ahk_exe chrome.exe") And !winactive("ahk_exe Photoshop.exe")
    WinActivate, ahk_exe chrome.exe
    SendInput ^t
    return
  22. Logerfo created this gist Oct 10, 2018.
    179 changes: 179 additions & 0 deletions AutoHotkey.ahk
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,179 @@
    #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")
    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()