Save Target As
Top  Previous  Next

Related example macro: Demo-SaveTargetAs

To download any kind of web content such as .WVM or .AVI videos, sound files such as .MP3, or documents such as .PDF, click on the link that connects to the item. In the case of a .PDF file, such a link is typically called "Display document" or for a video file, "Show video".

IIM records a TAG command:

TAG POS=1 TYPE=B ATTR=TXT:Open<SP>PDF<SP>Document<SP>

This would simulate a mouse click on the link. This is NOT what we want, we need a command similar to the right-click command "Save Target As" in Internet Explorer. Simply add CONTENT=EVENT:SAVETARGETAS to the recorded normal TAG line. You will then have:

TAG POS=1 TYPE=B ATTR=TXT:Open<SP>PDF<SP>Document<SP> CONTENT=EVENT:SAVETARGETAS

The downloaded files are copied to the iMacros download directory. The naming convention for downloaded images is the same as for downloaded files. This also means you can use ONDOWNLOAD FOLDER=c:\abc FILE=test to specify your name for the downloaded image.

A similar command is SAVEITEM for downloading images.
'



Page URL http://www.iopus.com/imacros/help/save_target_as.htm