Jump to content

Recommended Posts

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
Posted

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.

Posted

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]
Posted

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.

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
×
×
  • Create New...