Grateful for any pointers
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
gui, add, button, x5 y5 h20 w70 gsub1, Subroutine 1
gui, add, button, x5 y30 h20 w70 gexit, Exit Script
gui, show, w80
WinGetActiveTitle, Window_name
Win_Discord := "DISCORD"
Found_Discord := InStr( Window_name, Win_Discord, false ) ;AHK builtin function
return
sub1:
{
If !( Found_Discord >= 1 )
{
MsgBox, 1,!!WARNING!! ,The Client Window "%Win_Discord%" NOT Found. Found "%Window_name%"%lf_char%%lf_char%Press ENTER Key to Ignore Warning and Continue., 5 ; -seconds before timeout.
IfMsgBox, Cancel
exit ; User pressed the "Cancel" button.
IfMsgBox, Timeout
{
SplashTextOn,,, Script EXITING Now
Sleep 2000
SplashTextOff
exit ; i.e. Assume "Cancel" if it timed out.
}
}
WinActivate, Window_name
Send blaaaaaah
}
return
guiclose:
exit:
{
exitapp
}
return