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.
Home:
Gui, Home:Add, Text, x10 y15 w60 h15, Host Name:
Gui, Home:Add, Button, x270 y85 w50 h25 gHomeGuiClose, Exit/ESC
Gui, Home:Add, Button, x220 y85 w50 h25 gStart, Start
Gui, Home:Add, Edit, x10 y30 w135 h20 vname,
Gui, Home:Add, Text, x10 y95 w125 h15, Current Host: %name%
Gui, Home:Show, w325 h113, POH Helper - V0.01
return
HomeGuiClose:
ExitApp
; This Gui is generated by X-GUI Creator
Start:
Loop
{
Gui, Home:Submit, NoHide
ImageSearch, FoundX, FoundY, 40,40, 300, 300, %A_WorkingDir%\images\poh.png
if (ErrorLevel == 0)
{
Send, %name%
Send, {Enter}
msgbox,,Image,Image Detected
}
else
ImageSearch, FoundX, FoundY, 40,40, 300, 300, %A_WorkingDir%\images\unote.png
if (ErrorLevel == 0)
{
;;msgbox,,Image,Image Detected
Send, {3}
}
}
return
Esc::
ExitApp