istorage Posted June 13, 2013 Share Posted June 13, 2013 Hello everyone. I have been using imagesearch lately and it is great but i came to a scenario where in i need to search an image in video clips or flash clips (moving images). The solution i thought of is to capture the screen so it becomes a plain image and can use imagesearch. My question is how can i do it without opening an image program (like paint) pasting it there and search for the image i wanted to search. I do hope my question is not to confusing. Any help is greatly appreciated. Thank you. Link to comment Share on other sites More sharing options...
JohnQSmith Posted June 13, 2013 Share Posted June 13, 2013 Look in the help file for... _ScreenCapture_CaptureWnd Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Link to comment Share on other sites More sharing options...
istorage Posted June 14, 2013 Author Share Posted June 14, 2013 Thanks for the responseJohnQSmith but i do not want to capture the screen alone. Since imagesearch does not support movie clips it can not search an image you specify so i want to capture the screen so i can make the movie clip into a jpeg png bmp file which imagesearch supports then it can pinpoint the image i want. My problem is how do i do that? Screen capture is no problem but the rest of the process i dont know. Link to comment Share on other sites More sharing options...
FireFox Posted June 14, 2013 Share Posted June 14, 2013 Hi, Why do you need this script for? I mean to what FINAL purpose? Br, FireFox. Link to comment Share on other sites More sharing options...
istorage Posted June 14, 2013 Author Share Posted June 14, 2013 Hi, Why do you need this script for? I mean to what FINAL purpose? Br, FireFox. I need it for a website. The website needs to identify you before you can enter the site. It asks for a code which you will input. It is similar to this It is a flash file which randomizes number. Once you input your code and it is verified you can enter the website. I do have a lot of accounts on that site so i do need to enter a different code for each. I wanted to automate it by just inputting my codes to a script that way i wont need to memorize every code for every account plus i have thought of this as a personal project in learning more of autoit. I do hope i have given the needed info on what i am trying to accomplish. Thank you. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 14, 2013 Moderators Share Posted June 14, 2013 istorage,That sounds a lot like you wanting to bypass a security measure - which is not something we would support. What website is this? Can you give the URL so I can take a look please? 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...
istorage Posted June 14, 2013 Author Share Posted June 14, 2013 istorage, That sounds a lot like you wanting to bypass a security measure - which is not something we would support. What website is this? Can you give the URL so I can take a look please? M23 Automating it instead of me inputting code manually is not bypassing security measure that i am sure. The site is my company's site so im sorry i can not share the url. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 14, 2013 Moderators Share Posted June 14, 2013 istorage,Despite you being "sure", I am not. It asks for a code which you will inputIf all you were doing was entering a fixed password or PIN to identify yourself to the site I would agree with you that it was not bypassing a security measure, but the quoted text makes me think otherwise. How is this different to a CAPTCHA - other than in its implementation? 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...
istorage Posted June 14, 2013 Author Share Posted June 14, 2013 istorage, Despite you being "sure", I am not. If all you were doing was entering a fixed password or PIN to identify yourself to the site I would agree with you that it was not bypassing a security measure, but the quoted text makes me think otherwise. How is this different to a CAPTCHA - other than in its implementation? M23 Every registered member is given a code which identifies who that person is. The code is the password to enter website and determines who logged in and who did not. Every employee got their own code depending on your job. Since i got 5 different jobs in the same company i got 5 codes (since im a part time employee and i got 5 part time jobs in the same company) and whenever i go to work i need to time in so that makes it 5 time ins which is time consuming plus the codes are 10 digit codes. I hope that explains why i want an automation. I want a script for that purpose only. If you still have your doubts then it can not be helped. I can not share the url since its for employees only. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 14, 2013 Moderators Share Posted June 14, 2013 istorage, That bit makes perfect sense and, as I said earlier, I have absolutely no problem with automating that sort of thing at all. But you have still not answered my question regarding this video that you want to "freezeframe". You state that "i need to search an image in video clips or flash clips (moving images)" and then "It asks for a code which you will input". That sounds like a CAPTCHA to me - hence my questions. Please note that I am not accusing you of anything - and I have not locked the thread. I want you to get help - so convince me that it is all above board. Can you explain why you need to "freezeframe" this video in order to enter the "registered code" you speak of above? I am having real difficulty understanding why you need to look at frames of a video in order to enter a code - I hope you can appreciate why. So over to you to explain it to me - with screenshots if you like. 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...
istorage Posted June 14, 2013 Author Share Posted June 14, 2013 (edited) istorage, That bit makes perfect sense and, as I said earlier, I have absolutely no problem with automating that sort of thing at all. But you have still not answered my question regarding this video that you want to "freezeframe". You state that "i need to search an image in video clips or flash clips (moving images)" and then "It asks for a code which you will input". That sounds like a CAPTCHA to me - hence my questions. Please note that I am not accusing you of anything - and I have not locked the thread. I want you to get help - so convince me that it is all above board. Can you explain why you need to "freezeframe" this video in order to enter the "registered code" you speak of above? I am having real difficulty understanding why you need to look at frames of a video in order to enter a code - I hope you can appreciate why. So over to you to explain it to me - with screenshots if you like. M23 Ok to clear things up the video clip im talking about was the flash file which consist of numbers that is where you click your code. After clicking a certain number it randomizes the arrangement of numbers (0 - 9). It is a safety feature i assume. Now since it is not a static image (im not sure it that is what you call it) like png jpg and others (it is a flash file) i can not use imagesearch to search for the numbers i specify and click on it (wanted to automate clicking the numbers when you enter your code to enter site). To explain it further: Lets say my code is 1234567890 After i click on number 1 the numbers are rearranged After i click on number 2 it rearrange again.. and so on until i click the last number of my code which is 0. My problem is how can i go about it since imagesearch does not work on the above scenario (tested it a couple of times and no luck) and what i thought about was to capture the screen so it will be a static image so imagesearch can pinpoint where is the number i wanted the script to click on but i do not know how to do it. Edited June 14, 2013 by istorage Link to comment Share on other sites More sharing options...
jdelaney Posted June 14, 2013 Share Posted June 14, 2013 (edited) I've automated something similar, that only works when the sizing is consistent... I would already know where the characters would be, I would have 2d arrays setup with 1/0 for all the possible chars (1 being part of the char, 0 not)...I would then loop the current char's pixels (1 being white for your example, 0 green (or not white if colors change)) against all those arrays If 1 to 1, then add 1 to a counter, else subtract 1... Which ever array returns the highest value is my 'match' so loop through the character locations, and assign the best value to each of those positions (note, I tried ocr, and it returns nothing) Edited June 14, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 14, 2013 Moderators Share Posted June 14, 2013 istorage,Understood - you have a really devious system there! I am now content that your question is legal and I hope you understand why I was asking about it - I have never heard of such a thing before. I will have a think about how you might get this automated. Does the background and/or text colour change or is it always the same? If it does change, does it change between each digit or remain the same throughout the input? 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...
istorage Posted June 14, 2013 Author Share Posted June 14, 2013 istorage, Understood - you have a really devious system there! I am now content that your question is legal and I hope you understand why I was asking about it - I have never heard of such a thing before. I will have a think about how you might get this automated. Does the background and/or text colour change or is it always the same? If it does change, does it change between each digit or remain the same throughout the input? M23 No worries Melba23, i do understand. No, text color is always the same including the background. When a number is clicked without releasing your mouse button, the square where the number is located has this effect (glossy effect), when you release your mouse button it goes back to normal. Link to comment Share on other sites More sharing options...
istorage Posted June 14, 2013 Author Share Posted June 14, 2013 I've automated something similar, that only works when the sizing is consistent... I would already know where the characters would be, I would have 2d arrays setup with 1/0 for all the possible chars (1 being part of the char, 0 not)...I would then loop the current char's pixels (1 being white for your example, 0 green (or not white if colors change)) against all those arrays If 1 to 1, then add 1 to a counter, else subtract 1... Which ever array returns the highest value is my 'match' so loop through the character locations, and assign the best value to each of those positions (note, I tried ocr, and it returns nothing) Thanks for the info it is much appreciated. Link to comment Share on other sites More sharing options...
FireFox Posted June 14, 2013 Share Posted June 14, 2013 You can save each image number and search this number using an image search library like I said in my first post. Br, FireFox. ssnake 1 Link to comment Share on other sites More sharing options...
istorage Posted June 15, 2013 Author Share Posted June 15, 2013 You can save each image number and search this number using an image search library like I said in my first post. Br, FireFox. Thanks FireFox but this does not work for me. I already tried it before asking help here in forums. Link to comment Share on other sites More sharing options...
FireFox Posted June 15, 2013 Share Posted June 15, 2013 It works fine for me.Download and test the attachment.Br, FireFox.ImageSearch_digits.zip Link to comment Share on other sites More sharing options...
istorage Posted June 15, 2013 Author Share Posted June 15, 2013 It works fine for me. Download and test the attachment. Br, FireFox. The numbers i posted are not the same as the ones in the website. I just made those to illustrate. The one in the website is a flash file. Link to comment Share on other sites More sharing options...
Aarstad Posted June 16, 2013 Share Posted June 16, 2013 I had this problem when I tried to use imagesearch on window related mode, and the target control were the flash frame itself. Try searching the whole screen instead, and see if that works. 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