pallavii Posted August 8, 2019 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>
Nine Posted August 8, 2019 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 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
pallavii Posted August 8, 2019 Author 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now