Sign in to follow this  
Followers 0
istorage

Screen capture + image search

32 posts in this topic

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.

Share this post


Link to post
Share on other sites



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".

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi,

Why do you need this script for? I mean to what FINAL purpose?

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

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

digilock_zps38fb02a5.jpg

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.

Share this post


Link to post
Share on other sites

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? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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? :huh:

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.

Share this post


Link to post
Share on other sites

istorage,

Despite you being "sure", I am not. :(

 

It asks for a code which you will input

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? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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? :huh:

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.

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#11 ·  Posted (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

numbers1_zps6d052302.jpg

After i click on number 1 the numbers are rearranged

numbers2_zps93f9c977.jpg

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 by istorage

Share this post


Link to post
Share on other sites

#12 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

istorage,

Understood - you have a really devious system there! :sweating:

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? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

istorage,

Understood - you have a really devious system there! :sweating:

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? :huh:

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

You can save each image number and search this number using an image search library like I said in my first post.

Br, FireFox.

1 person likes this

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

It works fine for me.

Download and test the attachment.

Br, FireFox.

ImageSearch_digits.zip


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0