Skip to content

Instantly share code, notes, and snippets.

@fursiol0800
Forked from sour4bh/keep_it_alive.ahk
Created August 10, 2024 23:36
Show Gist options
  • Select an option

  • Save fursiol0800/f62f6535b52af2d6996a650a488054b6 to your computer and use it in GitHub Desktop.

Select an option

Save fursiol0800/f62f6535b52af2d6996a650a488054b6 to your computer and use it in GitHub Desktop.
KeepAlive(ColabWinTitle, Interval){
Loop
{
Sleep, 1000 * 3
if WinExist(ColabWinTitle)
{
WinActivate ; Automatically uses the window found above.
WinMaximize ; same
Sleep, 2000
MouseClick, left, 1750, 250, 1, 30
Send, {WheelDown 10}
Send, {WheelDown 20}
send, {PgDn 2}
MouseClick, left, 1750, 500, 1, 30
send, {PgUp 4}
send, {PgDn 8}
}
else{
MsgBox, , Halt : No Such Window , Did not find Window : %ColabWinTitle%
Return
}
Sleep, Interval
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment