Sign in to follow this  
Followers 0
freshmeat

Need help running 2 scripts to 2 different windows

3 posts in this topic

Hi, I just started using autoit and im looking for a way to do a pixelgetcolor and click in a window, then do the same in a different window. For the 1st scripted, I'm using something along the lines of

WinActivate("prog1")
WinWaitActive("prog1")
MouseClick("left", 470, 345 )   
ControlSend("prog1", "", "", "bla bla bla")

in the 2nd script i have "prog2" instead........it doesnt switch windows like i thought it would.

Any ideas?

Share this post


Link to post
Share on other sites



WinActivate("prog1")
WinWaitActive("prog1")
MouseClick("left", 470, 345 )    
Send("bla bla bla")

WinActivate("prog2")
WinWaitActive("prog2")
MouseClick("left", 470, 345 )    
Send("bla bla bla")
That should work, provided that "prog1" and "prog2" are the Window titles. See the help file under WinTitleMatchMode.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

That does work, I ended up combining the 2 scripts. Before they both worked fine seperately until they both wanted to WinActivate at the same time and ended up clickin each other. Things got kiinda ugly. Doing it this way, they wont fight for control. Thanks

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