Jump to content

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 )

WEnd

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)

opt("WinSearchChildren",1)

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

MsgBox(1,"Ready?","")

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 ?

Link to comment
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])
Next

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

Monkey's are, like, natures humans.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...