I would like to pause my script (which starts up when my computer boots up) to allow me to use F12 as the "Save As" function whenever Word or Excel is active. I wrote the following thread within the script:
Code: Select all
#IfWinActive ahk_exe EXCEL.EXE or ahk_exe WINWORD.EXE
^+s:: ; Save As
Run "I:\Temp Downloads\Macros\Suspend 7 Seconds.ahk"
Sleep 500
Send {F12}
ExitApp
I have another script that will restart my original script after 7 seconds. The script works for Word, but not for Excel. Am I utilizing the "or" statement incorrectly?
Secondary question: ChatGPT suggested use of Pause function. Would it work for what I want to do? How would I automatically restart the script after 7 seconds?