Alexandra95 Posted October 18, 2013 Posted October 18, 2013 (edited) Hi peoples, I'm happy that I found this forum where people hopefully can help me making a autoit program that uses OCR.For quite some time ive been playing some online game, wartune, it got a special wheel of fortune where you can obtain prizes.I want to keep the game related details as short as possible, but it comes to this: All rewards on the wheel are bound by several rules, setups etc and the content can be 99% predicted with the research I done.There's a very tiny chance to win big prizes from the wheel and to get a chance, there are several items to ignore before you can spin.Recently ive been talking with a few gamefans about this and one of them told I could use autoit with ocr to read the rewards from the screen. Droplr image example:<snip> Because some rewards are on the screen 99x out of 100 times you open and close the wheel (refreshes the available rewards) you see those bad items which spoil your chances.Im pretty new to autoit, but I have no problems doing the part where I can exit the wheel and open it again, the ocr part is new to me and I would like to know if it is possible to scan the rewards section for a certain item. I wonder if its possible to scan an area of 385x355 pixels (see image) to match another small sample picture I took from the wheel to use as method to match the contents in the 385x355 pixels area with the picture I choose to compare the rewards in that area with to search for a match.Or is it only possible to compare sets of pixel colors? All examples ive tried to find are only based on matching a group of pixel colors. Search area example:<snip> Example File to match with: (taken from this screenshot, it's that number 40 as it is an amount)<snip> Let's say the search zone is the computer screen itself, so the search area's will be this image's offsets.So, could someone help me to make a script the searches the search area example pic posted here for the example file to match with pic posted below it?The best would be to take the example search area pic as search target on the screen and the example to match with as the search goal. I would be really gratefull if I can get the basics of this script started so that i can continue to expand it myself and match the screen coordinates etc to the real situation.On this way I can make some sort of Bot that searches the wheel for certain rewards and closes it if it doesnt find anything and repeats the process by opening the wheel again, search and close until it found a match, this would save hours, lets say many days of searching and automates a very tiresome work.If pictures can't be use to match afteral, please explain how I could search an image by a 3x3 square of color matching pixels (resulting in the same idea but more complicated) Thanks so much in advance Edited October 18, 2013 by Melba23 Removed links
Starstar Posted October 18, 2013 Posted October 18, 2013 (edited) See the forum rules first.Welcome to Autoit. Edited October 18, 2013 by adnanbaloch Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."
Moderators Melba23 Posted October 18, 2013 Moderators Posted October 18, 2013 Alexandra95,adnanbaloch is quite right - please read the Forum rules (the link is also at bottom right of each page) - particularly the bit about not discussing game interaction - before you post again. Thread locked. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts