Skip to content

Instantly share code, notes, and snippets.

@ajxchapman
Last active August 28, 2020 09:00
Show Gist options
  • Save ajxchapman/6d1816e75c527e13ae5e35de7be5dc69 to your computer and use it in GitHub Desktop.
Save ajxchapman/6d1816e75c527e13ae5e35de7be5dc69 to your computer and use it in GitHub Desktop.

Revisions

  1. ajxchapman revised this gist Aug 28, 2020. 1 changed file with 18 additions and 18 deletions.
    36 changes: 18 additions & 18 deletions wireshark_install.ahk
    Original file line number Diff line number Diff line change
    @@ -10,13 +10,13 @@ WinWait, Wireshark [\d\.]+ 64-bit Setup,, 30
    Loop, 7
    {
    FileAppend, Loop, *
    gosub, setupForward
    gosub, setupForward
    }

    WinWait, Npcap [\d\.]+ Setup,, 60
    Loop, 2
    {
    gosub, setupForward
    gosub, setupForward
    }

    WinWait, Npcap [\d\.]+ Setup, Setup was completed successfully, 60
    @@ -32,26 +32,26 @@ IfWinExist
    }

    WinWait, Wireshark [\d\.]+ 64-bit Setup, Setup was completed successfully, 60
    IfWinExist
    {
    BlockInput, On
    Sleep, 250
    WinActivate
    Send, {Enter}
    IfWinExist
    {
    BlockInput, On
    Sleep, 250
    WinActivate
    Send, {Enter}
    BlockInput, Off
    }
    Sleep, 250
    Send, {Enter}
    BlockInput, Off
    }

    ExitApp

    setupForward:
    IfWinExist
    {
    BlockInput, On
    Sleep, 250
    WinActivate
    Send, {Enter}
    BlockInput, Off
    }
    IfWinExist
    {
    BlockInput, On
    Sleep, 250
    WinActivate
    Send, {Enter}
    BlockInput, Off
    }
    return
  2. ajxchapman created this gist Aug 28, 2020.
    57 changes: 57 additions & 0 deletions wireshark_install.ahk
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,57 @@
    #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn ; Enable warnings to assist with detecting common errors.
    SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
    SetTitleMatchMode, RegEx

    Run, "Wireshark-win64-3.2.6.exe"

    WinWait, Wireshark [\d\.]+ 64-bit Setup,, 30
    Loop, 7
    {
    FileAppend, Loop, *
    gosub, setupForward
    }

    WinWait, Npcap [\d\.]+ Setup,, 60
    Loop, 2
    {
    gosub, setupForward
    }

    WinWait, Npcap [\d\.]+ Setup, Setup was completed successfully, 60
    IfWinExist
    {
    BlockInput, On
    Sleep, 250
    WinActivate
    Send, {Enter}
    Sleep, 250
    Send, {Enter}
    BlockInput, Off
    }

    WinWait, Wireshark [\d\.]+ 64-bit Setup, Setup was completed successfully, 60
    IfWinExist
    {
    BlockInput, On
    Sleep, 250
    WinActivate
    Send, {Enter}
    Sleep, 250
    Send, {Enter}
    BlockInput, Off
    }

    ExitApp

    setupForward:
    IfWinExist
    {
    BlockInput, On
    Sleep, 250
    WinActivate
    Send, {Enter}
    BlockInput, Off
    }
    return