I am working on a AutoHotkey script that does a repetitive job in Google Chrome. Every time that I click a link from the script, I have to tell my script to sleep while the
I've had some success looking for a control to be present on the target page. Depends on the contents of the page of course. I used WinSpy to figure out a suitable target.
Here's the code that worked for me:
loaded := false
check_count := 0
MAX_CHECKS := 20
while !loaded {
Sleep, 100
ControlGetPos, x, y, ,,Chrome Legacy Window
if x == ""
loaded := false
else
loaded := true
check_count++
if (check_count >= MAX_CHECKS) {
Exit
}
}