Hi Dan,<br><br>I&#39;ve done this in C# using &#39;WatiN&#39; &lt;<a href="http://watin.sourceforge.net">http://watin.sourceforge.net</a>&gt; and also in Python using &#39;pywinauto&#39; &lt;<a href="http://pywinauto.openqa.org">http://pywinauto.openqa.org</a>&gt; and PAMIE &lt;<a href="http://sourceforge.net/projects/pamie">http://sourceforge.net/projects/pamie</a>&gt;. The WatiN page also references a project for ruby called Watir &lt;<a href="http://wtr.rubyforge.org">http://wtr.rubyforge.org</a>&gt; but I have not used it. <br>
<br>I haven&#39;t done this kind of thing from a Mac.<br><br>Watir works on Mac, but like I said, I have not tried it. That would be my first approach if I were working from a Mac.<br><br>One thing which helps alot is a Firefox plugin called &#39;Firebug&#39; &lt;<a href="http://www.getfirebug.com">http://www.getfirebug.com</a>&gt;. It can help you quickly navigae javascript and identify elements of interest in page source. (There&#39;s also a devloper toolbar for IE which fills a similar need, but I haven&#39;t seen anything for Safari...)<br>
<br>Happy hacking!<br><br><br>-Loren<br><br><div class="gmail_quote">On Sun, Jan 11, 2009 at 7:18 PM, Dan Martin <span dir="ltr">&lt;<a href="mailto:ummar143@shaw.ca">ummar143@shaw.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Problem: &nbsp;to automatically fill form fields in a web page based on<br>
changing criteria.<br>
<br>
I am sure this problem crops up in a number of areas. &nbsp;In my case, I<br>
place buy and sell orders (different variations) for stocks on my<br>
broker&#39;s web page. &nbsp;By the time I enter all the info and go through<br>
one or two confirmatory screens, the price has often changed and the<br>
order cannot be executed.<br>
<br>
I would like to have a script that would offer me a choice of trading<br>
account and stock to select. &nbsp;It would then calculate how many shares<br>
I could afford from the given account, and enter the info into the web<br>
page and subsequent pages, perhaps stopping before the very final<br>
confirmation. &nbsp;Ideally, I would like visual confirmation of what has<br>
happened.<br>
<br>
It appears that the broker&#39;s web page (https) contains Java script<br>
forms.<br>
<br>
Possible Solutions:<br>
1) &nbsp;Use Applescript to control the Safari web browser on my Mac.<br>
Applescript can call a bash shell (or vice versa) to allow programmed<br>
control.<br>
2) &nbsp;A perl script using &quot;mech&quot; (WWW::Mechanize).<br>
3) &nbsp;A script which calls curl.<br>
4) &nbsp;other?<br>
<br>
I am unfamiliar with these technologies, and I have only a vague idea<br>
about how they would work.<br>
<br>
Does anyone have suggestions on these or other approaches?<br>
<br>
Dan Martin<br>
GP Hospital Practitioner<br>
Computer Scientist<br>
<a href="mailto:ummar143@shaw.ca">ummar143@shaw.ca</a><br>
(204) 831-1746<br>
until Jan 21: (204) 219-6685<br>
answering machine always on<br>
<br>
_______________________________________________<br>
Roundtable mailing list<br>
<a href="mailto:Roundtable@muug.mb.ca">Roundtable@muug.mb.ca</a><br>
<a href="http://www.muug.mb.ca/mailman/listinfo/roundtable" target="_blank">http://www.muug.mb.ca/mailman/listinfo/roundtable</a><br>
</blockquote></div><br>