Sign in to follow this  
Followers 0
gzken

How to detect the control belongs to which window?

6 posts in this topic

Hi,

i wrote two scripts to launch the same external program to generate two different reports, when scripts running, there would be two external program running.

when the report is finished, the external program would pop-up the same message box contained same message 'Report complete'. these scripts executed parallel, so when i captured a message box contained 'Report complete', how could i detect the control belongs to which window(external program)?

any ideas? many thanks...

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

Well if its the same program twice, you can try to get the instance of the report's window.

Edited by FireLordZi

While Alive() {
	 DrinkWine();
}
AutoIt Programmer

Share this post


Link to post
Share on other sites

Well if its the same program twice, you can try to get the instance of the report's window.

in my script, i used winWait("win title","Report complete") function to wait the message box pop-up, when i got message box, it conclude that the program was finished. but there are two scripts run parallel, so how can i detect the message box belongs to which program?

Share this post


Link to post
Share on other sites

any more advice please...

Share this post


Link to post
Share on other sites

WinGetProcess()

And compare it with the results of Run()


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

WinGetProcess()

And compare it with the results of Run()

Wow, the idea seems good, i will try it, thank you Siao!!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0