BraveSlice Posted January 10, 2006 Share Posted January 10, 2006 Hi all! This is my first project with AutoIt, and I don’t have any experience with object oriented programming or in serious programming in any language, so bare with me. What I’m trying to accomplish: I’m trying to read from a Chess Master program a last move made. Moves are shown in a following format: 1. d2-d4 e7-e5 2. e2-e4 d7-d5 etc.... Windows explorer gives, when over the moves: Press CTRL-ALT-F to pause the display. >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Game Status Class: cguiDialogClass Size: X: 585 Y: 162 W: 241 H: 475 >>>>>>>>>>> Mouse Details <<<<<<<<<<< Screen: X: 716 Y: 409 Cursor ID: 2 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB: Hex: 0x003C5A Dec: 15450 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: X: 0 Y: 124 W: 229 H: 208 Control ID: 1806 ClassNameNN: CGUIListWnd1 Text: >>>>>>>>>>> Status Bar Text <<<<<<<<<<< >>>>>>>>>>> Visible Window Text <<<<<<<<<<< < << X >> > <| |> >>>>>>>>>>> Hidden Window Text <<<<<<<<<<< What I have tried to do1: Dim $msg, $i While 1 = 1 $msg = GUIGetMsg() If $msg <> 0 Then MsgBox(0,"Something",$msg) EndIf WEnd Result: Nothing happens What I have tried to do2: For $i = 0 To 1 $tila = ControlCommand ("Game Status", ">", 1806, "IsVisible", "") msgbox(0,"IsVisible", $tila); display the value $tila = ControlCommand ("Game Status", ">", 1806, "GetCurrentLine", "") msgbox(0,"GetCurrentLine", $tila); display the value $tila = ControlCommand ("Game Status", ">", 1806, "GetCurrentCol", "") msgbox(0,"GetCurrentCol", $tila); display the value $tila = ControlCommand ("Game Status", ">", 1806, "GetCurrentSelection", "") msgbox(0,"GetCurrentSelection", $tila); display the value $tila = ControlCommand ("Game Status", ">", 1806, "GetLineCount", "") msgbox(0,"GetLineCount", $tila); display the value $tila = ControlCommand ("Game Status", ">", 1806, "CurrentTab", "") msgbox(0,"CurrentTab", $tila); display the value msgbox(0,"Next Round", $tila); display the value Next Result: 1,1,1244797,1,0,1 and second time exactly same result. Is there something wrong what I have tried, or is this just not possible to do? Link to comment Share on other sites More sharing options...
seandisanti Posted January 10, 2006 Share Posted January 10, 2006 Hi all!This is my first project with AutoIt, and I dont have any experience with object oriented programming or in serious programming in any language, so bare with me.What Im trying to accomplish: Im trying to read from a Chess Master program a last move made.Is there something wrong what I have tried, or is this just not possible to do?it doesn't look like the data in the moves list is visible to autoit, so you have a couple of options. The hardest of the options would be to code your own OCR, but even that wouldn't be real hard since you only have 20 or so chars to identify. there are a few OCR scripts in scripts and scraps you could look to for examples. a much easier solution (although possibly more time consuming) if your game lets you save the move list, or export the list to a plain text file, you could then easily read in the text file. Link to comment Share on other sites More sharing options...
w0uter Posted January 10, 2006 Share Posted January 10, 2006 try memory-reading it My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
BraveSlice Posted January 11, 2006 Author Share Posted January 11, 2006 .... much easier solution (although possibly more time consuming) if your game lets you save the move list, or export the list to a plain text file, you could then easily read in the text file.Yes, thx, I think I will try this first. It IS a bit time consuming considering that it has to be polled on and on. However, it wins OCR hands down try memory-reading it Maybe someday (I read your mem script). 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