Code Example / Template AutoHotKey Script to cycle between browsers, or send a Ctrl+Tab every minute. 

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Enable warnings to assist with detecting common errors. 
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. 

SetTimer, PressTheKey, 60000 return 

PressTheKey: ;
Send, {CTRL DOWN}{Tab}{CTRL UP} 
WinActivate, ahk_exe msedge.exe 
Sleep 2000 ;
Send, {Tab}{ALT UP} 
Sleep, 1000 
WinActivate, ahk_exe chrome.exe 
Sleep, 5000 ;
WinGetTitle, Title, A ;MsgBox, The is "%Title% ;
If WinActive("Display.pptx - LibreOffice Impress") ;
SetTimer, PressTheKey, 20000 ;
else ;
SetTimer, PressTheKey, 5000 return 


 ::teh::the ::teh::the

Comments

Popular posts from this blog