pallavii 0 Posted August 8, 2019 hi all, in my script, i want to close the application/file, when application is idle,... opened application is not closed pls anyone help...☹️ <#include <File.au3> #Include <Array.au3> #include <Timers.au3> #include <MsgBoxConstants.au3> #include <WinAPISys.au3> Local $path = "D:\CTS ppt" Local $FileArray = _FileListToArrayRec($path, '*.ppsx', 1) For $i = 1 To $FileArray[0] If StringInStr($FileArray[$i], ".ppsx") > 0 Then $ppsx =ShellExecuteWait($path & "\" & $FileArray[$i]) Send("{F5}") While 1 If _WinAPI_GetIdleTime() >= 1 * 30 * 1000 Then ;MsgBox (0, "Time reached", "You have been idle.") WinClose($FileArray[$i]) EndIf Sleep(10 * 1000) WEnd EndIf Next> Share this post Link to post Share on other sites
Nine 930 Posted August 8, 2019 (edited) WinClose is wrong, you may want to use PP class, like : WinClose ("[CLASS:PP11FrameClass]") Use Au3Info.exe tool to get the class of your version. Post your code this way. Edited August 8, 2019 by Nine Not much of a signature, but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
pallavii 0 Posted August 8, 2019 26 minutes ago, Nine said: WinClose is wrong, you may want to use PP class, like : WinClose ("[CLASS:PP11FrameClass]") Use Au3Info.exe tool to get the class of your version. Post your code this way. ok thanq Share this post Link to post Share on other sites