Problem: to automatically fill form fields in a web page based on changing criteria.
I am sure this problem crops up in a number of areas. In my case, I place buy and sell orders (different variations) for stocks on my broker's web page. By the time I enter all the info and go through one or two confirmatory screens, the price has often changed and the order cannot be executed.
I would like to have a script that would offer me a choice of trading account and stock to select. It would then calculate how many shares I could afford from the given account, and enter the info into the web page and subsequent pages, perhaps stopping before the very final confirmation. Ideally, I would like visual confirmation of what has happened.
It appears that the broker's web page (https) contains Java script forms.
Possible Solutions: 1) Use Applescript to control the Safari web browser on my Mac. Applescript can call a bash shell (or vice versa) to allow programmed control. 2) A perl script using "mech" (WWW::Mechanize). 3) A script which calls curl. 4) other?
I am unfamiliar with these technologies, and I have only a vague idea about how they would work.
Does anyone have suggestions on these or other approaches?
Dan Martin GP Hospital Practitioner Computer Scientist ummar143@shaw.ca (204) 831-1746 until Jan 21: (204) 219-6685 answering machine always on