hefty Posted March 26, 2006 Share Posted March 26, 2006 (edited) Hi. I have a game called "Guild Wars", and I am attempting too make a bot that will search for creeps to kill based on their name. However I cannot find a way to search for a string on the screen in-game. Thankyou for any help anyone can give. Edited March 26, 2006 by hefty Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 26, 2006 Moderators Share Posted March 26, 2006 Hi. I have a game called "Guild Wars", and I am attempting too make a bot that will search for creeps to kill based on their name. However I cannot find a way to search for a string on the screen in-game.Thankyou for any help anyone can give.Is the text readable via AutoInfo.exe? If so try ControlGetText() if not, then you may have to create an OCR and use PixelCheckSum() for the letters. 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...
hefty Posted March 26, 2006 Author Share Posted March 26, 2006 Is the text readable via AutoInfo.exe? If so try ControlGetText() if not, then you may have to create an OCR and use PixelCheckSum() for the letters.how do i create a ocr? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 26, 2006 Moderators Share Posted March 26, 2006 Quite a bit of detail involved... type in OCR in the search enging and look in scripts and scraps when you do, and you'll find a few examples to maybe get an idea from. 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...
hefty Posted March 26, 2006 Author Share Posted March 26, 2006 Quite a bit of detail involved... type in OCR in the search enging and look in scripts and scraps when you do, and you'll find a few examples to maybe get an idea from.and how do i search for letters using pixelchecksum? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 26, 2006 Moderators Share Posted March 26, 2006 and how do i search for letters using pixelchecksum?Just do the search like I said (for OCR), they all use it. 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...
hefty Posted March 26, 2006 Author Share Posted March 26, 2006 (edited) Just do the search like I said (for OCR), they all use it.i just looked and it is way too much trouble.ohh well . Edited March 26, 2006 by hefty Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 26, 2006 Moderators Share Posted March 26, 2006 Wow man, did you read what I typed?... "do a search for "OCR" in the Scripts and Scraps forum".... Here's what you would have found:http://www.autoitscript.com/forum/index.ph...indpost&p=59483http://www.autoitscript.com/forum/index.ph...ndpost&p=139783http://www.autoitscript.com/forum/index.ph...ndpost&p=146679http://www.autoitscript.com/forum/index.ph...indpost&p=59789http://www.autoitscript.com/forum/index.ph...ndpost&p=122976 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...
hefty Posted March 26, 2006 Author Share Posted March 26, 2006 Wow man, did you read what I typed?... "do a search for "OCR" in the Scripts and Scraps forum".... Here's what you would have found:http://www.autoitscript.com/forum/index.ph...indpost&p=59483http://www.autoitscript.com/forum/index.ph...ndpost&p=139783http://www.autoitscript.com/forum/index.ph...ndpost&p=146679http://www.autoitscript.com/forum/index.ph...indpost&p=59789http://www.autoitscript.com/forum/index.ph...ndpost&p=122976what i meant is ocr is too hard Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 26, 2006 Moderators Share Posted March 26, 2006 what i meant is ocr is too hardWell, if you can't get the information with WinGetText()/ControlGetText() then you'll be left with no choice. Good Luck. 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...
hefty Posted March 26, 2006 Author Share Posted March 26, 2006 Would this work? WinActivate ( "Guild Wars" ) sleep(800) Func Kill() ; Sleep(500) $Name = WinGetText("Lvl 0 Plague Wormr") ; If IsString($Name) Then Sleep(500) ; A worm was found Send("1") Sleep(500) Else ; No Worm FOund EndIf EndFunc Link to comment Share on other sites More sharing options...
anyday Posted March 26, 2006 Share Posted March 26, 2006 WinGetText("Lvl 0 Plague Wormr") is lvl 0 plague wormr the name of the window your looking for text in? or is that the type of person your trying to kill. im a noob to autoit but as far as i know wingettext gets text inside of a window. Link to comment Share on other sites More sharing options...
nfwu Posted March 26, 2006 Share Posted March 26, 2006 Would this work?WinActivate ( "Guild Wars" )sleep(800)Func Kill() ; Sleep(500) $Name = WinGetText("Lvl 0 Plague Wormr") ; If IsString($Name) Then Sleep(500) ; A worm was found Send("1") Sleep(500) Else ; No Worm FOund EndIf EndFuncNo.WinGetText("Lvl 0 Plague Wormr")is lvl 0 plague wormr the name of the window your looking for text in? or is that the type of person your trying to kill.im a noob to autoit but as far as i know wingettext gets text inside of a window.Correct#) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
hefty Posted March 26, 2006 Author Share Posted March 26, 2006 (edited) Perhaps this will work? WinActivate ( "Guild Wars" ) sleep(800) Func Kill() ; Sleep(500) $Name = WinGetText("Lvl 0 Plague Worm") ; If StringIsASCII ( $Name ) Then Sleep(500) ; A worm was found Send("1") Sleep(500) Else ; No Worm FOund EndIf Edited March 26, 2006 by hefty Link to comment Share on other sites More sharing options...
anyday Posted March 26, 2006 Share Posted March 26, 2006 again i think the wingettext("lvl 0 plague worm") isnt going to do anything for you. if your playing guild wars i think it should be wingettext("Guild Wars", ""). Replace guild wars with whatever the window title is. but i dont know if this will work since it is inside a game? Link to comment Share on other sites More sharing options...
greenmachine Posted March 26, 2006 Share Posted March 26, 2006 again i think the wingettext("lvl 0 plague worm") isnt going to do anything for you. if your playing guild wars i think it should be wingettext("Guild Wars", "").Replace guild wars with whatever the window title is.but i dont know if this will work since it is inside a game?Not sure about Guild Wars specifically, but in previous experiences with games, reading text from a game window doesn't happen. The text and graphics are drawn directly to the window, which means that any control-related function, or win-related function trying to get inside the game is not going to work. Ever. Link to comment Share on other sites More sharing options...
hefty Posted March 27, 2006 Author Share Posted March 27, 2006 Not sure about Guild Wars specifically, but in previous experiences with games, reading text from a game window doesn't happen. The text and graphics are drawn directly to the window, which means that any control-related function, or win-related function trying to get inside the game is not going to work. Ever.your right. it did not work.me and my dad tryed everything.So how would i use ocr with guild wars? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 27, 2006 Moderators Share Posted March 27, 2006 your right. it did not work.me and my dad tryed everything.So how would i use ocr with guild wars?It's not a matter of "using" one, you would have to make one, and I gave you the links to study theirs that they made. There is no manual on how to make one. 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...
hefty Posted March 27, 2006 Author Share Posted March 27, 2006 It's not a matter of "using" one, you would have to make one, and I gave you the links to study theirs that they made. There is no manual on how to make one.Autoit cant find the controls used in my game.So how do I find them myself? Link to comment Share on other sites More sharing options...
herewasplato Posted March 27, 2006 Share Posted March 27, 2006 Autoit cant find the controls used in my game.So how do I find them myself?read this post:http://www.autoitscript.com/forum/index.ph...ndpost&p=144675then read the entire thread and remember not to ask for help in that forum... ask in this one "v 3Support" [size="1"][font="Arial"].[u].[/u][/font][/size] 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