HurleyShanabarger Posted March 24, 2021 Posted March 24, 2021 Hi, I have a vb.NET script that that uses the API of an external program to do some configurations. Certain configurations trigger a popup window that the user needs to interact with. In AutoIt I would use AdLibRegister to take care of the triggered window, while the script is "stuck". How can this be implemented in vb.NET?
TheXman Posted March 24, 2021 Posted March 24, 2021 (edited) Since you are posting this on an AutoIt forum, once can only assume that you are asking how it could be done using AutoItx. The following are a couple of ways that you could do what you're wanting to do using AutoItx or native VB.net. Possible method 1: If you know where in the process the popup window may occur, then you could execute a WinWait() with a specified timeout. If WinWait() is successful, meaning the popup occurred, then do whatever your adlib would've done. Otherwise, proceed as you normal. Possible method 2: Run your own pseudo adlib by spawning a separate child script that runs while your parent process exists. In that script, you can have a loop that periodically checks for the popup window (or windows) and, of course, checks for the existence of the parent process in order to know when to exit. Edited April 16, 2021 by TheXman CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
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