Re: Wanted: Well scriptable browser
Re: Wanted: Well scriptable browser
- Subject: Re: Wanted: Well scriptable browser
- From: David Hood <email@hidden>
- Date: Mon, 24 Mar 2003 10:45:36 +1200
On Monday, March 24, 2003, at 10:14 AM, Felicidad Sauser wrote:
I try to write a script that controls a web browser to
do the following things:
- fill in form text fields
- choose popup menus, radio + checkboxes
- click form submit buttons
- click some links
Looks possible to do through Explorer's do script javascript control
over the items on the page, but you're going to need to know the index
number or names of the items (links etc) you are wanting to refer to,
and be comfortable with javascript.
This looks for the already open browser window that's loaded
www.google.com, fills out the form with the word applescript and does a
search:
tell application "Internet Explorer"
------------------
--approach three, find an open window and fill in a form
set search to "applescript"
repeat with eachwindow in ListWindows
set InfoCollection to GetWindowInfo eachwindow
if (item 1 of InfoCollection = "
http://www.google.com/") then
set javascriptcode to "document.forms[0].elements[0].value='" &
search & "';document.forms[0].submit();"
do script javascriptcode window eachwindow
end if
end repeat
----------------------
end tell
Be aware the set javascript.... submit();" is one line (it may get
mutilated in emailing.
Regards,
David Hood
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.