Sign in to follow this  
Followers 0
jpres

Read from a maximized window?

10 posts in this topic

#1 ·  Posted (edited)

Edit: Figured IT out, TY GUYS! REALLY APPRECIATE IT!

Well i'm trying to get autoit to read from a window that it maximized on the screen and uses direct X.

I was simply using PixelGetColor(X,Y) at the required X and Y values for me, but the problem I noticed, was that it just kept reading straight through the game that was open and went to the main desktop//any windows open on screen while game was minimized.

Any way to get it to read from the game itself?

Edited by jpres

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

While WinActive?

Edited by AwAke

Share this post


Link to post
Share on other sites

While WinActive?

Ty I'll try this, sorry, but I am very new to this, really appreciate the help though. :P

Share this post


Link to post
Share on other sites

Got some code we could look at? So we can see what you are trying and maybe pinpoint where it's failing?


Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]

Share this post


Link to post
Share on other sites

Dont worry =] and anytime.

Share this post


Link to post
Share on other sites

Func GetColor()
    While WinActive ("World of Warcraft")
$color = PixelGetColor(260,80)
WEnd
    sleep(100)
    MsgBox(0,"Color","The hex color is" & $color)
EndFunc

That's what i'm using to try any get it, but I don't think it's working.

Share this post


Link to post
Share on other sites

Func GetColor()
    While WinActive ("World of Warcraft")
$color = PixelGetColor(260,80)
WEnd
    sleep(100)
    MsgBox(0,"Color","The hex color is" & $color)
EndFunc

That's what i'm using to try any get it, but I don't think it's working.

You have created a function but you have never actually called it. Above everything you need to call GetColor().

GetColor()

Func GetColor()
    While WinActive ("World of Warcraft")
        $color = PixelGetColor(260,80)
    WEnd
    sleep(100)
    MsgBox(0,"Color","The hex color is" & $color)
EndFunc

Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Edit: Figured it out, ty guys!

Edited by jpres

Share this post


Link to post
Share on other sites

Edit: Figured it out, ty guys!

Yeah with the Hotkey then it doesn't matter. Was it a PixelCoordMode issue?


Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]

Share this post


Link to post
Share on other sites

Yeah with the Hotkey then it doesn't matter. Was it a PixelCoordMode issue?

No, I forgot to put the game in windowed mode, so it was messing everything up.

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