MrTieDye Posted January 5, 2008 Share Posted January 5, 2008 On the initial screen for MTGO, there is a Launch button. At first, it is grayed out until some things initialize, then it changes color to show it is a button you can click. When you hover over it, it changes color yet again. However, the following code returns the same checksum no matter what state the button is in. Am I doing something wrong? ;open MTGO Run("C:\Program Files\Wizards of the Coast\Magic Online III\Renamer.exe","C:\Program Files\Wizards of the Coast\Magic Online III") ;Wait for MTGO to open WinWaitActive("Magic Online 3.0") ;Move the mouse out of the way MouseMove(0,0) ;get the first checksum, while the button is grayed out $test = PixelChecksum(407,550,410,555) ;wait for initialization Sleep(20000) ;get the next checksum, with the button ready to be clicked $test1 = PixelChecksum(407,550,410,555) ;move the mouse over the button MouseMove(380,555) ;get the checksum with the mouse over the button $test2 = PixelChecksum(407,550,410,555) ;show a MsgBox with the first value as the title, and the second value as the text MsgBox(0,$test,$test1) ;show a MsgBox with the second value as the title, and the third value as the text MsgBox(0,$test1,$test2) $test has the same value as $test1 and $test2. What am I doing wrong? Link to comment Share on other sites More sharing options...
MrTieDye Posted January 6, 2008 Author Share Posted January 6, 2008 Even more frustrating is the following code. expandcollapse popup;move the mouse out of the way MouseMove(0,0) ;get the pixel color of two pixels on the screen $test = PixelGetColor(493,459) $another = PixelGetColor(410,561) ;launch MTGO and wait for it to activate Run("C:\Program Files\Wizards of the Coast\Magic Online III\Renamer.exe","C:\Program Files\Wizards of the Coast\Magic Online III") WinWaitActive("Magic Online 3.0") ;get the pixel color of the same pixels after MTGO has launched $test1 = PixelGetColor(493,459) $another1 = PixelGetColor(410,561) ;move the mouse to hover over the button MouseMove(400,558) ;wait for MTGO to initialize Sleep(20000) ;get the pixel color of the same pixels with the mouse hovering over the button $test2 = PixelGetColor(493,459) $another2 = PixelGetColor(410,561) ;Open a file for writing $file = FileOpen("test.txt", 2) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0,"Oops", "File did not open") EndIf ;Write all the variables to a file so they can be easily viewed FileWriteLine($file, "Test = " & $test) FileWriteLine($file, "Another = " & $another) FileWriteLine($file, "Test1 = " & $test1) FileWriteLine($file, "Another1 = " & $another1) FileWriteLine($file, "Test2 = " & $test2) FileWriteLine($file, "Another2 = " & $another2) ;close the file FileClose($file) The file output looks like this... Test = 16777215 Another = 16777215 Test1 = 16777215 Another1 = 16777215 Test2 = 16777215 Another2 = 16777215 So, all the pixels are the same color all the time? They should at least change when MTGO starts up... Link to comment Share on other sites More sharing options...
MrTieDye Posted January 6, 2008 Author Share Posted January 6, 2008 Is it possible that MTGO is blocking the PixelChecksum() test? If I do a PixelChecksum() with another program, say paint for instance, it recognizes a difference when it is running and when it is not. Link to comment Share on other sites More sharing options...
Durovec Posted July 9, 2008 Share Posted July 9, 2008 This problem is in transparency of initial window. Your PixelChecksum will return checksum value from window under MTGO. If you want to share your experience with me, please contact me. Link to comment Share on other sites More sharing options...
PurpleAster99 Posted July 15, 2008 Share Posted July 15, 2008 Im assuming the transparency setting you are talking about would be why clicks are not being registered by it either? Link to comment Share on other sites More sharing options...
abb Posted July 16, 2008 Share Posted July 16, 2008 (edited) Snippet from my MTGO3_Autologin.au3 While ControlCommand("Magic Online 3.0","Launch",iLaunchButtonControlID,"IsEnabled") <> 1 Sleep(5); slaughter CPU hog WEnd ControlClick("Magic Online 3.0","Launch",iLaunchButtonControlID) Edited July 16, 2008 by abb Link to comment Share on other sites More sharing options...
LarryDalooza Posted July 16, 2008 Share Posted July 16, 2008 This problem is in transparency of initial window. Your PixelChecksum will return checksum value from window under MTGO. If you want to share your experience with me, please contact me.If I asked for help, would you wait 6 months to respond?MrTieDye Posted Jan 6 2008, 12:05 AMDurovec Posted Jul 9 2008, 03:49 AM AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 16, 2008 Moderators Share Posted July 16, 2008 If I asked for help, would you wait 6 months to respond?If you asked for help, no one would respond in 6 years ... They'd be afraid to get a ticket on the short bus muttley ... Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now