if(A_TimeIdlePhysical > 60000) { ; 60,000 milliseconds WinClose, ahk_class Chrome_WidgetWin_1 MsgBox, Google Chrome was closed due to user inactivity. }
This check could be done periodically, e.g. using SetTimer.
SetTimer