likevvii Posted January 10, 2014 Share Posted January 10, 2014 (edited) Can AutoIt search for a number(image) and then translate it to a number(text)? I want to convert small data table and auto-enter them into an excell document. For an example: 1. Search for an image" "(this cannot be hilighted as text) 2. Know this image is "14" 3. Enter 14 onto microsoft excell the 14 is taken from a chart where the numbers are not hilightable. ex: Is there some auto number detection function for autoit? If not, what are some ways where I can approach this situation? What I have thought of is search for 1 2 3 4 5 6 7, ... , 99 and set each image manually. So it image searches from 1-99 until there is a match, then it will input "14" I am kind of new to autoit. This is very important and I am willing to pay (paypal) if someone is able to talk to me to meet my needs. *I hope offering money is not against the terms (which I read)" Edited January 10, 2014 by likevvii Link to comment Share on other sites More sharing options...
jaberwacky Posted January 10, 2014 Share Posted January 10, 2014 I haven't tried this but I think it might be what you need. Just give it your best shot and then come back and ask questions. '?do=embed' frameborder='0' data-embedContent>> Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
likevvii Posted January 10, 2014 Author Share Posted January 10, 2014 (edited) I haven't tried this but I think it might be what you need. Just give it your best shot and then come back and ask questions. '?do=embed' frameborder='0' data-embedContent>> I am very sorry, but I just don't know how to implement this into my script. Thank you for showing me that this does exsist! I googled "how to use Optical character recognition in autoit" But there are too many functions and symbols to understand. If you could help me implement this into my current script, that would be so awesome for my dad. I currently want to "imagesearch", then OCR the value on the right (odds), Imagesearch the (*x&), then input the value onto the excell document (rates) Basically converting data on a table to excell. So far, I have only figured out how to imagesearch and do simple clicks, from youtube and guides #include <ImageSearch.au3> HotKeySet("S", "Start") $X = 0 $Y = 0 Func Start() $Search = _ImageSearch('1A.bmp', 0, $X, $Y, 0) If $Search = 1 Then $Search = _ImageSearch('99.bmp', 0, $X, $Y, 0) If $Search = 1 Then $Search = _ImageSearch('*x&.bmp', 0, $X, $Y, 0) If $Search = 1 Then MouseClick($X, $Y, 0) EndIf EndIf EndIf EndFunc While 1 sleep(100) Wend My on the second image search "$Search = _ImageSearch('*x&.bmp', 0, $X, $Y, 0)" (soon to be OCR if possible), I dont know how to search a specific region. Since I dont want to do anything with numbers from , how do I only focus the region horizontal to me? Then after I image search the (*x&), I want to use it as a refrence point, how would I set the coordinates to the first Box to input my data? Just entering some (x,y) in MouseClick would just use top left corner of my screen as the reference point, but I want to use (*x&) as my ref point. ( my dad isnt good with computers at all, so I just want it make it as easy as possible for him) ): sorry for so much begging.I am new to AutoIt, and everything is very complicated for me. If you dont understand what I am talking about, what I am doing this for, or anything else, just tell me and I will try my best to explain it! Edited January 10, 2014 by likevvii Link to comment Share on other sites More sharing options...
jaberwacky Posted January 10, 2014 Share Posted January 10, 2014 This is for an online game? Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
likevvii Posted January 10, 2014 Author Share Posted January 10, 2014 (edited) This Horse racing. This is where the chart is: http://www.twinspires.com/tstv-lite If you try it, you will see that numbers are produced with adobe flashplayer. (not able to copy paste anything) If possible can you please teach me how to do other stuff? Since you never used OCR before and I don't want you to waste your time learning it, if you are never going to use it. I found a different site that IS ABLE TO COPY AND PASTE my values so I don;t have to use OCR anymore! -Image search on a specific area based on a previous image search. Example: First I image search: from: Then After I found: , I want to copy (and paste later) the number directly to the right of the: . (for this case: , it is the value "1") another example: ( , is the value: "8/5") I want to copy directly right of the , because that value is linked directly to the . so right now, my code is: #include <ImageSearch.au3> HotKeySet("S", "Start") $X = 0 $Y = 0 Func Start() $Search = _ImageSearch('1A.bmp', 0, $X, $Y, 0) If $Search = 1 Then If $Search = 1 Then MouseClick( "left", $X, $Y, 3, 5) ;So what do i do for the x/y coordinates? MouseClick( "left", $X, $Y, 3, 5) MouseClick( "left", $X, $Y, 3, 5) Sleep( 10 ) Send("{ctrl V}") EndIf EndFunc While 1 sleep(100) Wend So right now my code searches for the: , then proceeds to triple click, and then press ctrl+V. My problem is the MouseClick's X,Y coordinates. How do i set the mouse click coordinates to move (50 pixels to the right, and 5 pixels down. BASED ON WHERE THE is.) I was thinking (MouseClick( "left", $X+50, $Y-5, 3, 5)), but that didnt work. Sorry if I am not clear enough, I really dont know how to present my situation well. Edited January 10, 2014 by likevvii Link to comment Share on other sites More sharing options...
jaberwacky Posted January 10, 2014 Share Posted January 10, 2014 Well, the rules may not allow for the discussion of this because it's related to game playing. Sorry. Have to wait and see what a mod/mvp/glorious leader says about it. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
billmack Posted January 10, 2014 Share Posted January 10, 2014 I think OCR is way beyond what you want to or should even try to do. Trying to target a portion of the screen and capture it , then OCR it would be a frustrating and futile effort. Maybe try reverse engineering the swf code of the horse racing app. There are swf decompilers out there. You might be able to glean something about the values from swf code variables. Or use a mem hack tool dll that you could use with autoit to search for the values in the app/browser that's running the horse racing swf. Link to comment Share on other sites More sharing options...
billmack Posted January 10, 2014 Share Posted January 10, 2014 Could you use the odds from this page instead? They are text and can be copy/pasted. Use cURL or AutoIT to read the data. https://www.tvg.com/horse-race-results Link to comment Share on other sites More sharing options...
likevvii Posted January 11, 2014 Author Share Posted January 11, 2014 Could you use the odds from this page instead? They are text and can be copy/pasted. Use cURL or AutoIT to read the data. https://www.tvg.com/horse-race-results thats after the race, so there wouldnt be much use for the data anymore. But thanks for mentioning about the swf codes, i will check those out. is anyone able to teach me the command for image search in a specific area? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2014 Moderators Share Posted January 11, 2014 Hi,I regard this as a real edge case as regards the "game interaction" rule. The participant is not in any way interacting with the "game" - the horses do not run faster or slower because of the betting (or at least I hope not ) - and the script seems to merely read data from a screen. So I am happy for the thread to remain open for the time being. However, as the possible "game" problem was raised by an earlier poster I am somewhat disappointed that no-one thought to report the thread so that the Mods were aware of it. We do try and look in on most things, but it is not always obvious that we need to get involved. So please, if there is a doubt of any kind about a thread/post just report it and we will come and take a look. 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 Link to comment Share on other sites More sharing options...
jaberwacky Posted January 11, 2014 Share Posted January 11, 2014 ::sheepish:: Yeah, I assumed that the first mention of game would get 28 reports. Will do my part from now on. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2014 Moderators Share Posted January 11, 2014 jaberwocky6669,If several people report the same post it is all amalgamated by the forum software into a single report, so do not worry about swamping us. And now we return to our normal programming. 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 Link to comment Share on other sites More sharing options...
jaberwacky Posted January 11, 2014 Share Posted January 11, 2014 Ok likevvii. I was thinking (MouseClick( "left", $X+50, $Y-5, 3, 5)), but that didnt work. 50 pixels might be too far or it might not be enough. I think it might be good to download a pixel ruler such as the one found here: http://www.soft.tahionic.com/download-ruler/index.html. Make sure to get that one because there are some stolen versions floating around. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Geir1983 Posted January 11, 2014 Share Posted January 11, 2014 For CTRL + V you first need to select the text, is that what your 3 clicks do? (your script seems to do 3x3 clicks for a total of nine clicks). Is the text highlighted after your script ends? 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