flip2405 Posted March 19, 2008 Share Posted March 19, 2008 Can some one build me an example script..... What i want it to do is watch my processlist then when notepad.exe closes it sends me a message saying notepad closed Link to comment Share on other sites More sharing options...
Developers Jos Posted March 19, 2008 Developers Share Posted March 19, 2008 What have you tried yet that isn't working ? Did you also look in the helpfile at: ProcessExists() ProcessWaitClose() SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 19, 2008 Moderators Share Posted March 19, 2008 Can some one build me an example script.....What i want it to do is watch my processlist then when notepad.exe closes it sends me a message saying notepad closedYou've been a part of the forum long enough to know to post an example of what you've tried.You could use AdlibEnable() / DllCallBackRegister + SetTimer dllcall / or even a simple While/Wend loop with ProcessExists() nested in an If/Then conditional statement. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Nahuel Posted March 19, 2008 Share Posted March 19, 2008 (edited) If you are bored, look at my process manager. Look at the part where it refreshes the list. If a new process is found or one was closed, it refreshes the list. Then you only have to play with arrays.. shouldn't be hard to do. -edit- I thought he mentioned notepad.exe as an example... maybe he wants to do it for any process? He should be clearer... Edited March 19, 2008 by Nahuel Link to comment Share on other sites More sharing options...
flip2405 Posted March 19, 2008 Author Share Posted March 19, 2008 (edited) okay here is what iv tryed Sleep(1200) While 1 $D = ProcessExists("Notepad.exe") WEnd If $D = 1 Then MsgBox(0,"Hi","3") EndIf If $D = 0 Then Msgbox(0,"bye","2") EndIf Edited March 19, 2008 by SmOke_N Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 19, 2008 Moderators Share Posted March 19, 2008 okay here is what iv tryed Sleep(1200) While 1 $D = ProcessExists("Notepad.exe") WEnd If $D = 1 Then MsgBox(0,"Hi","3") EndIf If $D = 0 Then Msgbox(0,"bye","2") EndIfYou never leave the loop is why you never get a message box. Use Jdeb's example if it's as simple as you have it here:ProcessWaitClose("notepad.exe") MsgBox(64, "Info", "Process no longer exists") Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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