new Day new Task do be done!
i have a really smooth and well working "Auto Skipper" Script for anoying Buttons inside my Game.
so my m8 dont got to wait for uneccessary Timers while i am on Toilett or Phone etc.
i made it for 1920 x 1080 on my 17! Gaming Laptop.
it operates incredible smoot since i put in the *50 variables (cuse Buttons been with Transparent background)
now i search ideas and solutions for different Resolutions because my m8 ones doesnt work.
he s playing on something like 3.840 x 2.160 Pixel , must be UHD, so is the Monitor size mattering? i guess no?
only the resolution if i am right , so how many resolutions can be up there?
i got https://www.touchandscreen.de/bildschirmaufloesungen a hundreds
but on PC arent we usually using HD Ready, HD and UHD? inside the Game itself?
what are my posibilitys? i got the idea to let my m8 scrap the screenshots himself rename em and hope they´r working
PixelSearch? TextSearch? what are your thoughts?
or is there a solution with the search rectangle or the variation to make it fit different resolutions?
i would welcome ideas for it
Thanks Tobgun1
Code: Select all
#Requires AutoHotkey v2.0 ; Script uses AutoHotkey V2 to Work
#SingleInstance Force ; allows only one script at the same time
InstallMouseHook ; Installs MouseCommands to ensure it is On
SetKeyDelay(1000) ; 2 Sec. command for waiting time of each Key
Loop {
SendMode("Event")
if A_TimeIdle > 15000 ; 15 Sec. Timer for - "Action" if User was inactive for x Sec. - Anti-AFK-Timer Main idea
{
MouseMove Random(-800,800), Random(-800,800), Random(100), "R" ; "Action"-> random MouseMove across of "800" Pixel
}
}
F8:: { ; F8 to Activate Script
Static on := False
If on := !on
{
ComObject("SAPI.SpVoice").Speak("Script Activated", ) ; Sound for F8 when u activate the Script "Script Activated"
SetTimer(ImgScan, 1000) ; 1 Sec. Timer for the Image-Search
SetTimer(Activ, 0) ; (Off) 0 Sec. Timer for the repeating Sound while Script is running "Script is Running" (check down below)
}
Else
{
ComObject("SAPI.SpVoice").Speak("Script Paused") ; Sound for F8 Script Pause "Script Paused"
SetTimer(ImgScan, 0)
SetTimer(Activ, 0)
}
}
F10:: { ; F10 for Script ShutDown
ComObject("SAPI.SpVoice").Speak("Script ShutDown") ; Sound when Script gets ShutDown "Script ShutDown"
ExitApp
}
Activ() { ;UDF for the Sound
ComObject("SAPI.SpVoice").Speak("Script is running") ; repeating Sound while Script is runnning (every x Seconds check Timer above - SetTimer(Activ, xxx) )
}
Skip() { ;UDF Label for the Skip-Combo ("Skip")
Send("{Esc 3}{f 3}") ; "Skip-Combo" command - 3 Times Esc + 3 Times f
}
ImgScan() {
CoordMode "Pixel"
if ImageSearch(&X, &Y, 0, 0, A_ScreenWidth, A_ScreenHeight, "*50 " A_ScriptDir "\Skip.png") ; Search Image and do following Action -> working
{
ComObject("SAPI.SpVoice").Speak("Skip-Combo") ; Sound
Skip ; UDF for the Skip-Combo ["Skip()" see above]
}
if ImageSearch(&X, &Y, 0, 0, A_ScreenWidth, A_ScreenHeight, "*50 " A_ScriptDir "\Mission Success.png") ; working
{
ComObject("SAPI.SpVoice").Speak("Success")
Skip
}
if ImageSearch(&X, &Y, 0, 0, A_ScreenWidth, A_ScreenHeight, "*50 " A_ScriptDir "\Continue.png") ; working
{
ComObject("SAPI.SpVoice").Speak("Continue")
Send("{f 2}")
}
if ImageSearch(&X, &Y, 0, 0, A_ScreenWidth, A_ScreenHeight, "*50 " A_ScriptDir "\Mission Completed.png") ; working
{
ComObject("SAPI.SpVoice").Speak("Mission Completed")
Send("{f 2}")
}
if ImageSearch(&X, &Y, 0, 0, A_ScreenWidth, A_ScreenHeight, "*50 " A_ScriptDir "\Ready.png") ; working
{
ComObject("SAPI.SpVoice").Speak("Ready")
Sleep (4000)
Send("{x}{f}")
}
if ImageSearch(&X, &Y, 0, 0, A_ScreenWidth, A_ScreenHeight, "*50 " A_ScriptDir "\Contracts.png") ; working
{
Sleep (1000)
ComObject("SAPI.SpVoice").Speak("Letz Go")
Sleep (3000)
Send("{f}")
}
if ImageSearch(&X, &Y, 0, 0, A_ScreenWidth, A_ScreenHeight, "*50 " A_ScriptDir "\Crack Continue.png") ; working
{
ComObject("SAPI.SpVoice").Speak("Continue Crack")
Sleep (4000)
Send("{f}")
}
}
; as for now, i want to dedicate this Final Version and all further Script Versions to my AMAZING AutoHotKey Teacher "DuckingQuack".
; Thanks a lot for Teaching me AHK, Improve my Skills with new commands , searching for new ideas AND solving Problems i wouldnt found alone!
; Was an Amazing Step-by-Step learning by doing and felt Incredible! Thank you very much!