Phaser 0 Posted August 28, 2011 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? Share this post Link to post Share on other sites
happytc 0 Posted August 28, 2011 Plz give more code Share this post Link to post Share on other sites
Phaser 0 Posted August 28, 2011 Plz give more codeIts 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 Share this post Link to post Share on other sites
Rogue5099 18 Posted August 28, 2011 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. My projects: Inventory / Mp3 Inventory, Computer Stats Share this post Link to post Share on other sites
Phaser 0 Posted August 28, 2011 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 Share this post Link to post Share on other sites
Rogue5099 18 Posted August 28, 2011 Write this to troubleshoot: $var = PixelGetColor( 125, 209, $hWnd ) MsgBox(0, "Pixel", "Current Pixel: " & $var) See if the number you have it equal to matches what you have in your code. If not change number. My projects: Inventory / Mp3 Inventory, Computer Stats Share this post Link to post Share on other sites
Phaser 0 Posted September 24, 2011 (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 September 24, 2011 by Phaser Share this post Link to post Share on other sites
bogQ 91 Posted September 24, 2011 (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 September 24, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)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. Share this post Link to post Share on other sites