Skip to content

Instantly share code, notes, and snippets.

@sour4bh
Created February 12, 2020 21:05
Show Gist options
  • Select an option

  • Save sour4bh/a9e2959da1b5deb059eac2503b89271e to your computer and use it in GitHub Desktop.

Select an option

Save sour4bh/a9e2959da1b5deb059eac2503b89271e 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