Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving picture in webpage

Status
Not open for further replies.

PhilBreau

Technical User
Dec 14, 2001
108
CA
I have created a script to automatically load webpages. How do I save the picture.

proc main

string site
string b
integer a=10

start:

itoa a b

strcpy site "strcat site b
strcat site ".jpg"


site

while $endwhile

; how do I save picture?

a++


goto start


endproc
 
When you load the .jpg file, are you able to use the File | Save As menu item to save the file to disk? I tried this with version 4.5 of Procomm, but the menu item was not being enabled for some reason (Procomm doesn't work well with newer versions of IE, which is really the browser under Procomm's UI). If you have version 4.7 of Procomm, or an older (4.x or so) version of IE, this may work for you. I haven't been able to find my version 4.7 CD to test this adequately. If the File | Save As menu item is available to you after .jpg file has been loaded, your script could manually navigate through the Save As dialog using the termkey or termvkey commands. Unfortunately, the Internet-specific portions of Procomm were never suitably realized in the ASPECT language, so you have to use workarounds to script much of the Internet functionality.
 
Thanks Knob.

I had to use sendkey. Termkey or termvkey didn't work in web browser.

When I use

sendkey ALT 'F'
sendkey 'A'

I get a "Save Picture" window. The script can't communicate with this popup using sendkey ALT 'S'. Once I manually click the save key, the script can continue. I believe the script is suspended at this point. Similar to how it suspends using usermsg. How can I get the script to communicate with the save picture window?

Thanks


BTW Knob, I remember a user wanting to timestamp input. I have written a script that works like a protocol analyzer, time stamping each character read by the com port. I don't have it now. If interested I can restore from backup and post it.
 
I won't have any better ideas until I can find my 4.7 CD, but if the focus in the Save Picture window is set to the Save button, try having your script send a space or a carriage return (^M) and see if that is able to activate the Save button.

Feel free to post your script if it is no problem. The more examples, the better!
 
I was finally able to find my 4.7 CD and installed it on a test machine, but the File | Save As menu item is still greyed out. What version of IE are you using? I'm using 5.0something. I know that changes had to be made during Procomm's development whenever a new version of IE came out, so the problem I am probably having is due to Procomm not being able to interface with a newer version of IE than was aroun when Procomm was developed. So, I can't quite test the problem you are seeing.

However, I was able to test this using an IE window instead of Procomm's browser and was able to send the Alt-S using a script, so it appears to be a problem due to the integration of IE into Procomm. Here are a couple other things to try to see if you can work around the problem. First, if you bring up the Save Picture dialog manually by selecting the File | Save As menu item in Procomm, does the dialog appear to have focus? If not, we could use a winactivate command to set focus to the dialog. If the dialog does have focus, are you able to manually press Alt-S to save the picture?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top