Skip to content

Instantly share code, notes, and snippets.

@ajxchapman
Last active August 28, 2020 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajxchapman/6d1816e75c527e13ae5e35de7be5dc69 to your computer and use it in GitHub Desktop.
Save ajxchapman/6d1816e75c527e13ae5e35de7be5dc69 to your computer and use it in GitHub Desktop.
#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment