Jump to content
Sign in to follow this  

How to pick between 2 windows ?

Recommended Posts

Basic send example :

msgbox (1,"Ready ?","Send 1 every 3.5 ")

While 1

ControlSend("[CLASS:GxWindowClass]", "" , "" , "1")

Sleep(3500 )


This works but when you open 2 windows it only clicks on the last one that was active.

So I tried getting the handle and using the handle in the title.

Opt("WinTitleMatchMode", 3)


$handle = ControlGetHandle("[CLASS:GxWindowClass]", "", "")


ControlSend($handle, "" , "" , "1")

It still only sends on the last window that was active ...

The point of this is to simply send text to a window that is currently not active

Help plz ?

Share this post

Link to post
Share on other sites

This particular one is easier to show than explain.

$a_WinList = WinList("[CLASS:GxWindowClass]")

For $i = 1 To $a_WinList[0][0]
    MsgBox(0,"Handle of " & $a_WinList[$i][0], $a_WinList[$i][1])

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...