Jump to content

Recommended Posts

Posted

Hi everyone

Well we have just had to buy a new laptop and my tool no longer works on it, I use pixelgetcolor to wait for something to happen then when it happens proceed to the next step

Do
Until Not (PixelGetColor( 125, 209, $hWnd ) = 1015138)
Sleep(120

It works fine on my XP pc but on a staff members win 7 machine it works "sometimes" we have set the win7 laptop to classic mode after a bit of research but its still doing this, anyone met this before?

Posted

Plz give more code

Its a ver big file and wont work on anyone elses pc as it looks at our database, the issue is the pixel that pixelgetcolor is looking for moves or changes colour all the time, I think its moving rather than not being the same color

Posted

Depending on your X and Y locations if your new latop has a higher resolution then the coordinates could be off.

Try using:

Opt("PixelCoordMode", 0) ;relative coords to the defined window

You might have to change the X and Y values to match the window coordinates of the pixal location.

Yeah I should have saiud, I do use that already at the top of the file

HotKeySet("{ESC}", "killit")

Opt('PixelCoordMode', 0)

Opt("GUIOnEventMode", 1)

Any other ideas, i think its a win7 things that neads changing or setting

  • 4 weeks later...
Posted (edited)

Need to revisit this issue, I have done a few simple tests by screen printing the area I am trying to get the colour from, on XP the colour is as my app is set

$coord = PixelSearch( 8, 65, 25, 95, 0xE6CBA0,0,0, $hWnd)
If Not @error Then
    MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
Else
    MsgBox(0,"box name", "Cant find it " )
EndIf

When I do a screen print on win7 the colours are different, we have tried all different themes on win7 and none of them make the colour match? how do I work around this, any ideas?

Edited by Phaser
Posted (edited)

why dont you try

If @OSVersion = 'WIN_7' then
 PixelSearch( 8, 65, 25, 95, 0xsomething,0,0, $hWnd)
else
 PixelSearch( 8, 65, 25, 95, 0xE6CBA0,0,0, $hWnd)
endif

look in help file for more info about @OSVersion

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

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
  • Recently Browsing   0 members

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