Code: Select all
#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.
;RESPOND TO LOGON
SetTitleMatchMode, slow
TitleFind := "XYZ Network Logon"
if not Process, Exist, XYZ.exe
{
Loop
{
WinGetActiveTitle, Title ; waits until window is active
if Title = %TitleFind%
{
WinWaitActive,,,,,You are about to remove
{
WinWaitActive,,,,,You are about to exit
{
WinWaitActive,,,,,Order quantity
{
sendraw, PASSWORD
MouseClick, left,320,150
}
}
}
}
Sleep, 1000
}
}