Jump to content

Reading/Tracking Multiple Windows


Recommended Posts

I was wondering if there was a way to track multiple windows.

Say the windows are

ChronoGear - Chat Window

KagamineRin - Chat Window

right now I have it checking the windows by

Opt("WinTitleMatchMode", 2)
$text = ControlGetText("- Chat Window", "", "RichEdit20W1")

and its looking to activate functions based on this

Func _DoSomething2($sString)
    Select
        Case StringInStr($sString, ": http://")
            $Continue = MsgBox ( 36, "Reading Command", "Do you wish to execute command from user? " & $sString)
            If ($Continue = 6) Then
                ShellExecute(_RemoveLeftOfString($sString, ": http://"))
                ControlSetText("- Chat Window", "", "RichEdit20W2", "Program: Accepted Link Command")
                ControlSend("- Chat Window", "", "RichEdit20W2", "{ENTER}")
                $text = ControlGetText("[ACTIVE]", "", "RichEdit20W1")
            Else
                ControlSetText("- Chat Window", "", "RichEdit20W2", "Program: Denied Link Command")
                ControlSend("- Chat Window", "", "RichEdit20W2", "{ENTER}")
                $text = ControlGetText("[ACTIVE]", "", "RichEdit20W1")
            EndIf
EndFunc

is there a way to add/change a coding to have it monitor all the windows and send to only the window that requests it?

Link to comment
Share on other sites

If you want monitor all the windows

you need to know their title or handle

winlist is made for that !

Lol, well I will experiment even though I'm new to that feature.

What I was running into was that right now when someone messeges me my program will get the text from them, so if they sent a command "http://" it would trigger a code in my program. When a new window is made by another person who text me, it stops and doesn't get any text from any previous windows unless I click on them. If WinList monitors all windows based on my coding

Opt("WinTitleMatchMode", 2)

It should check any window with "- Chat Window" in its name right?

This is what is currently checking the window for the text

$text = ControlGetText("- Chat Window", "", "RichEdit20W1")

I think I have to modify the $text variable, but I am not sure if I have to use WinList in a different sense as I want it to monitor the windows even if I am not on the windows them self. If your wondering what I am making, its a program for the program Xfire. I wanted to add a few extra things lolz. Same Sense as adding extra features, or like MsnPlus.

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...