gte Posted May 6, 2009 Posted May 6, 2009 I have a program gui open, and after a certain amount of time, it will time out. (below is the small window it opens) in front of the main gui, and it also opens a second window in the task bar that is labeled "active notes"What command can I use to have events trigger off of this? I checked in task manager and they all are using the same process and PID, the only difference I see is that it is popping open the active notes window in the task bar. Can an event be triggered when a window with the title 'active notes' opens up in the task bar?Ultimately I want to have it close these windows and restart the program automatically. The active notes window is a warning, and then service center - your inactive ... is the confirmation that the program has frozen and needs to be killed and restarted.Thanks HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script
Mat Posted May 6, 2009 Posted May 6, 2009 What have you tried so far? try testing WinActive ("Active Notes"). Put in a loop and... Do Until WinActive ("Active Notes") ;Do Event AutoIt Project Listing
gte Posted May 6, 2009 Author Posted May 6, 2009 I was thinking of trying winlist, after searching through the forums, but that didn't seem correct? Let me research winactive What have you tried so far? try testing WinActive ("Active Notes"). Put in a loop and... Do Until WinActive ("Active Notes") ;Do Event HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script
martin Posted May 6, 2009 Posted May 6, 2009 Maybe this helps; you can detect when a window is created and then check the window title, but it's probably easier to follow mdiesel's suggestion. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
gte Posted May 6, 2009 Author Posted May 6, 2009 Using a winlist command, I'm able to get the handleDo the handles ever change?It appears as if it's given the handle 0x00860610 to the window in front that says it must be restarted, and 0x00490644 to the main window behind it?I was thinking of trying winlist, after searching through the forums, but that didn't seem correct?Let me research winactive HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script
gte Posted May 6, 2009 Author Posted May 6, 2009 I also was able to gather this information from it, which is the most useful that will stay the same each time, and I can trigger off of? HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script
martin Posted May 6, 2009 Posted May 6, 2009 I also was able to gather this information from it, which is the most useful that will stay the same each time, and I can trigger off of?It is almost certain that the next time the application runs the window handle will be different IMO. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
bluebearr Posted May 6, 2009 Posted May 6, 2009 What about something like this? While 1 WinWait("Active Notes", "Your inactive process") ; <-- need to check if AutoIt can see this text _DoStuffToWindow() WEnd Func _DoStuffToWindow() ; Actions to take when the window appears. EndFunc BlueBearrOddly enough, this is what I do for fun.
gte Posted May 7, 2009 Author Posted May 7, 2009 I wrote something like that, and it worked, thank you! What about something like this? While 1 WinWait("Active Notes", "Your inactive process"); <-- need to check if AutoIt can see this text _DoStuffToWindow() WEnd Func _DoStuffToWindow() ; Actions to take when the window appears. EndFunc HP OpenView ServiceCenter keep alive scriptRemote Desktop Login Script
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