i have some script which auto fill a password into some presentation's dialog boxs in powerpoint.
im trying to terminate the script only when the presentation's powerpoint not exist anymore.
i mean: As long as the user reading the presentation,
keep the script running to auto fill the password in the upcoming dialog boxs,
but only when the user close the presentation, then terminate the script.
im tryed to use WinWaitClose but since i have the WinWaitActive into a loop,
i guess the script can not detect it this way.
maybe for this situation i should use SetTimer but i failed with that too.
any help would be appreciated!
Code: Select all
loop,
{
WinWaitActive, ahk_class NUIDialog ;wait for presentation dialog box to showup
SendInput, 1234 ; enter passowrd
SendInput {Enter} ; send enter to confirm the presentation dialog box
}
;heres my problem - how to terminate the script when user close the presentation ?
WinWaitClose, "PowerPoint - my story" ; wait for the presentation with this tittle to be closed to terminate this script
ExitApp