re: filling out forms in Netscape
re: filling out forms in Netscape
- Subject: re: filling out forms in Netscape
- From: Tony Cappelli <email@hidden>
- Date: Fri, 27 Jul 2001 09:38:26 -0700
At 9:18 AM -0700 7/26/01, email@hidden wrote:
>
Is it possible to fill out an on-line form (such as the user id and
>
password dialog of Hotmail) using AppleScript and Netscape or any other
>
Webbrowser?
>
I tried to use OpenURL and Post Data, but couldn't get it to work. Maybe
>
someone could point me to a good example.
Yes! The best example is in the Peachpit book: Applescript for the Internet (I think that's the title). The way I did it was to visit the form page that I wanted to script. Enter the form data as you would normally and click submit. Whatever the URL in the location bar is can be used as the URL in the OpenURL statement. Next, you must go back to the form page and take note of every tag that contains: input type="whatever" and make sure all of these variables get set in your Applescript.
This is much easier when the form is using the "get" method. In fact, if they have a POST command in the tag <FORM action="whatever.cgi" METHOD=POST> I found that you can usually send the same variables using the "GET" method and sumbitting a long URL:
http://www.hotmail.com/cgi-bin/whatever.cgi?variable1FromFormSource=YourDataHere&variable2FromFormSource=MoreOfYourDataHere
The question mark in the URL specifies the "get" method and the "&" separates the variable declarations.
It definitely takes some work and experimentation to get each form working in my experience.
--Best Regards
Tony Cappelli
<
http://www.LABridge.com/>
PGP Signature:
2569 7004 47C8 1323 D3A5 1382 FE1D 6CD8 140F 7FAB