Extracting a Image to display in C#.net Program

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
redbrad0

Extracting a Image to display in C#.net Program

Post by redbrad0 » Wed Nov 23, 2005 3:52 am

I am trying to help get around a image varifaction by running the program in silent mode and then on the macro for the CAPTCHA to display just what the image looks like in my program so it does not confuse the member to what image they need to look at. Any help here?
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Wed Nov 23, 2005 12:15 pm

You can use IIM to save the image to a file, and then load the image inside your C# program:

Here is an example for the Yahoo Search Marketing (Overture) website:

Code: Select all

URL GOTO=https://secure.overture.com/s/dtc/center/?mkt=us     
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}}    
TAG POS=1 TYPE=IMG ATTR=TXT:<IMG<SP>src="/securityCode?c=*  CONTENT=EVENT:SAVEITEM  
Note that I had to replace the session ID with * to make it work ( http://www.iopus.com/iim/help/faq_session_id.htm )

If you call this macro from your program, you should replace the time tag
FILE=+_{{!NOW:yyyymmdd_hhnnss}} with a variable, so you can give the file a defined name (e. g. FILE={{my-image-name}} ).
Guest

Post by Guest » Wed Nov 23, 2005 11:10 pm

I tried your code but changed it to work for our system. For a test I loaded up the page to the correct screen and then ran the following macro

Code: Select all

URL GOTO=http://www.blogger.com/create-blog.g
ONDOWNLOAD FOLDER=D:\images FILE=captcha.jpeg
TAG POS=1 TYPE=IMG ATTR=TXT:<IMG<SP>width="200"<SP>alt="Registration<SP>key"<SP>height="70"<SP>src="/captcha*  CONTENT=EVENT:SAVEITEM
This gives a error on trying to save the image. What would I need to type in? Here is the html that is around that tag.

Code: Select all

<label for="f-captcha"> Word Verification </label> </th> <td> <img width="200" alt="Registration key" height="70" src="/captcha">  <br><div class="errorbox-good"> <input type="text" name="captcha" style="width:200px;" tabindex="3" id="f-captcha" class="text"> <br>  </div>
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Thu Nov 24, 2005 12:17 am

This macro works well in my tests. It assumes your are already in the page with the image:

Code: Select all

VERSION BUILD=5010115     
TAB T=1     
TAB CLOSEALLOTHERS         
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}}    
TAG POS=1 TYPE=IMG ATTR=TXT:<SP><BR><LF><BR><LF><SP>  CONTENT=EVENT:SAVEITEM 
Guest

Post by Guest » Thu Nov 24, 2005 2:32 am

Thank you it worked like a charm
kareapri
Posts: 12
Joined: Thu Mar 19, 2009 6:54 am

Re: Extracting a Image to display in C#.net Program

Post by kareapri » Fri Mar 20, 2009 12:30 am

Not working any longer. At least on the free FF version.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: Extracting a Image to display in C#.net Program

Post by Tech Support » Wed Mar 25, 2009 10:33 am

kareapri, what is not working any longer? SAVEITEM works well in my test.

Example:

Code: Select all

URL GOTO=http://www.iopus.com/
TAG POS=1 TYPE=IMG ATTR=SRC:http://www.iopus.com/shared/images/iopus.gif CONTENT=EVENT:SAVEITEM 
What are you trying to save? Can you please post the URL of the web page and/or the macro that creates the problem? This would allow us to quickly re-create the issue on our test systems.
kareapri
Posts: 12
Joined: Thu Mar 19, 2009 6:54 am

Re: Extracting a Image to display in C#.net Program

Post by kareapri » Sun Apr 12, 2009 7:23 pm

kareapri
Posts: 12
Joined: Thu Mar 19, 2009 6:54 am

Re: Extracting a Image to display in C#.net Program

Post by kareapri » Sun Apr 12, 2009 11:42 pm

Tech Support : I think we have a bug here. Used to work...
Post Reply