You
might be able to use the variables A_
CaretX and A_
CaretY which are meant to tell you where the caret (blinky line when typing) is on your screen. But it may not work within browsers. I just tested in my firefox fork, chrome, and vivaldi (also chromium based like opera) and it didn't work. I used this code, which worked in Notepad++:
Code: Select all
Loop
{
Sleep 100
Tooltip %A_CaretX%`n%A_CaretY%
}
--
Another approach you could consider which would be different altogether is having AHK notice when a window has gone into the "f mode" for video fullscreen (which I'm unfamiliar with) based on the dimensions of the window or if a message gets displayed notifying you you're in full screen and using an imagesearch for it, that it would then flip itself out of f mode again by artificially pressing f then artificially pressing {f11} for you. Something like this:
Code: Select all
#Persistent
SetTimer, CheckYouTube, 1000
return
CheckYouTube:
WinGetTitle, var, A
If InStr(var,"Youtube") ; not sure if I used this command right, did not double check
{
WinGetPos, pos, A ; you'd need to set the numbers to what is reported by Window Spy in the f mode for x/y and width/height. I think those are the right variable names for WinGetPos, but double check too
If posx=-8 && posy=-8 && posh=1216 &&posw=1916
{
Send f
Sleep 100
Send {f11}
}
}
return
The code is untested.