Monitoring for an open window off a timer event

Monitoring for an open window off a timer event

Using Win 95 and 32-bit PB v5.0, I want to, off a timer event, monitor for an open window. When I detect it, searching once every five minutes, I want to trigger its OK button.

So far, I can find the window, and even bring it to the top ? or make it active. But how do I trigger its OK button?

The closest I can find is SendMessageA, which requires the handle of the button object. How can I get its handle?

There are two ways to resolve this problem. You can just stop atthe window level, which you already have working, and trigger an event onthe window to close it. You can do this using the Send function; thepbm_customXX events start at 1052 plus the number on the right hand sideof the pbm_customXX event.

For example:

would equate to:
Send( hWnd, 1053, 0, 0 )
Or you could use the FindWindow API call to search for the commandbutton inside the window. This works because in the Windows operatingsystem, every control is a window, even a command button! You can searchfor the command button by the text on it or by classname. Then just usethe standard windows command to press it.

The preferred method would be for the command button to trigger a customevent in the window to handle your close processing, and to use Send totrigger the same event.

Share the Post:
XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes

ransomware cyber attack

Why Is Ransomware Such a Major Threat?

One of the most significant cyber threats faced by modern organizations is a ransomware attack. Ransomware attacks have grown in both sophistication and frequency over the past few years, forcing

data dictionary

Tools You Need to Make a Data Dictionary

Data dictionaries are crucial for organizations of all sizes that deal with large amounts of data. they are centralized repositories of all the data in organizations, including metadata such as