Jump to content

Recommended Posts

Posted

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

Posted Image

Posted Image

Posted

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.
Posted

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?

Posted Image

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.
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...