Arbie Posted November 10, 2013 Share Posted November 10, 2013 I use AutoIt so infrequently that I feel like a newbie every time. It takes me hours to even get my bearings again. So, I'm asking here once in case anyone has done this or can type out an outline in 2 minutes. It is pretty simple in concept. All my forum searches find stuff that's much more complicated, and I get a headache just trying to figure out what bits I could use. I have a process / app called "NetMeter.exe". It's window title is "Netmeter". I need to kill it and restart it every 30 minutes or so, as a brute force fix for another issue. I am now doing this manually but want to automate it. Any quick help on this? Thanks very much. Link to comment Share on other sites More sharing options...
water Posted November 10, 2013 Share Posted November 10, 2013 ProcessClose and Run? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
mikell Posted November 10, 2013 Share Posted November 10, 2013 AdlibRegister("MyFunc", 30*60*1000) ? Link to comment Share on other sites More sharing options...
Arbie Posted November 11, 2013 Author Share Posted November 11, 2013 Well, thanks for answering and I guess those are commands I can try to use. But the info is too cryptic to be of immediate help. Looks like another learning session is in order. I'll figure it out. Link to comment Share on other sites More sharing options...
mikell Posted November 11, 2013 Share Posted November 11, 2013 Well... something like this then HotKeySet("{ESC}", "Terminate") AdlibRegister("MyFunc", 30*60*1000) ; 30 mn Func MyFunc() ProcessClose("NetMeter.exe") Sleep(1000) Run( .....\NetMeter.exe") ; <<<<< full path here EndFunc Func Terminate() Exit EndFunc Link to comment Share on other sites More sharing options...
l3ill Posted November 11, 2013 Share Posted November 11, 2013 Here is one...as well. ;$appRun = ("NetMeter.exe") $appRun = ("Notepad.exe") While 1 ShellExecute($appRun) Sleep(10000) ; for testing / change to 30 minutes ProcessClose($appRun) Sleep(3000) WEnd My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
Arbie Posted November 17, 2013 Author Share Posted November 17, 2013 Thanks very much! I actually wouldn't have figured out most of that. I appreciate your time and expertise. Link to comment Share on other sites More sharing options...
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