Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#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