Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save fursiol0800/6e4513debe1050423344db26880ef979 to your computer and use it in GitHub Desktop.
InputBox, ColabFileName, Colab Keep Alive Script, Enter the Google Colab filename
ColabWinTitle := ColabFileName . " - Colaboratory - Google Chrome"
if WinExist(ColabWinTitle){
WinActivate
InputBox, Interval, Keep Alive : %ColabWinTitle%, Enter an interval (in minutes) to emulate mouse and keyboard behaviour :
if Interval is not integer
{
MsgBox, , Halt : Bad Type, Enter an Integer for the Interval
Return
}
else{
MsgBox, , Interval Set, interval set for %Interval% minutes.
Interval := 1000 * 60 * Interval
KeepAlive(ColabWinTitle , Interval)
}
}
else{
MsgBox, , Halt : No Such Window, Did not find Window : %ColabWinTitle%
Return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment