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, first click on the link that connects to the item. In the case of a .PDF file, such a link is typically called "Open document" or for a video file, "Show video". iMacros records a TAG command:

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

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. This can be archieved by editing the macro and adding
CONTENT=EVENT:SAVETARGETAS to the recorded normal TAG command. You will then have:

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

The files downloaded in this way are copied to the iMacros download directory by default. You can use the
ONDOWNLOAD command to specify the name and location for the downloaded image.




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