Siflou Posted October 17, 2011 Share Posted October 17, 2011 Hey Guys, I have a VM on virtual box and Windows XP service pack 3 installed. And I have a script that doesn't get the color like I wanted to do. I figured out that it get the desktop color instread of the active window because I switched background and the color were similar as my background but never the color that I wanted to be. I have to mention that it actually works on my other computer with Vista on it and also my laptop with windows 7. Here is an example of test : Somebody have any idea ? Thanks a lot. /code #RequireAdmin Sleep(3000) $x = 1010 $y = 25 $var = PixelGetColor($x,$y) MouseMove ($x, $y, 0) MsgBox(0,"The decimal color is", $var) /code Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 17, 2011 Share Posted October 17, 2011 Activate the window you want to pixelsearch first. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Siflou Posted October 17, 2011 Author Share Posted October 17, 2011 What do you mean ? Link to comment Share on other sites More sharing options...
JohnOne Posted October 17, 2011 Share Posted October 17, 2011 I dont know how "Activate the window" can be explained more clearly but I'll try. Make sure the window you are performing the search on is active. I assume you have Autoit Installed on the vertual machine? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Siflou Posted October 17, 2011 Author Share Posted October 17, 2011 Yes, I have autoit installed on the VM and I use the last version of autoit I tried the code : #RequireAdmin WinActivate("MyWindow") Sleep(3000) $x = 1010 $y = 25 $var = PixelGetColor($x,$y) MouseMove ($x, $y, 0) MsgBox(0,"The decimal color is", $var) To activate the window but it doesn't work. Any idea ? Link to comment Share on other sites More sharing options...
Xandy Posted October 18, 2011 Share Posted October 18, 2011 Try activating MyWindow by hand via clicking MyWindow or ALT+TABing to it ext... Does that provide the color then found in MyWindow or the desktop? Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
Siflou Posted October 18, 2011 Author Share Posted October 18, 2011 No it still provide the desktop color. For example, I have mouse clicks that works correctly, but even if I alt tab in the window, it still provide the desktop colors Link to comment Share on other sites More sharing options...
Bowmore Posted October 18, 2011 Share Posted October 18, 2011 (edited) Try this #RequireAdmin $x = 1010 $y = 25 WinActivate("MyWindow") WinWaitActive("MyWindow") $var = PixelGetColor($x,$y) MsgBox(0,"The decimal color is", $var) Edited October 18, 2011 by Bowmore "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
Siflou Posted October 18, 2011 Author Share Posted October 18, 2011 It still provide the background colors. But I found maybe something interesting. When I use the window info tools info on my program, it still return the desktop color instead of my program color. Remember that I use a Virtual box VM with windows xp pro sp 3. Maybe it could help. Link to comment Share on other sites More sharing options...
Siflou Posted October 19, 2011 Author Share Posted October 19, 2011 (edited) In the window info tool, I checked "Magnify" and I see in big character that it gets the color of my desktop and its like if my start menu is open, because i See like in big characters "courriel electronique" with the logo, msn with logo. Also, I tried the info tools with Windows media player and it worked perfectly, so maybe its the program ? My program is a game called knight online. But it still works perfectly on my other computers. Can some one help me please I really want to fix it up Edited October 19, 2011 by Siflou Link to comment Share on other sites More sharing options...
bogQ Posted October 19, 2011 Share Posted October 19, 2011 My program is a game called knight online. But it still works perfectly on my other computers. Can some one help me please I really want to fix it up knight online?you already had one redirect to forum rules about game automation on your first topic, and i can see that you're asking this in two topic + you resurrected one old topic try to read them one more time reported 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. Link to comment Share on other sites More sharing options...
Recommended Posts