From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <6e35c0620510071903x512c9536n4c43f14570ffeb99@mail.gmail.com> Date: Fri, 7 Oct 2005 19:03:01 -0700 From: Jack Johnson To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] webscript In-Reply-To: <43465F0E.6080104@golubovsky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <43465F0E.6080104@golubovsky.org> Topicbox-Message-UUID: 96e9faba-ead0-11e9-9d60-3106f5b1d025 On 10/7/05, Dimitry Golubovsky wrote: > Russ Cox wrote: > > I would like to be able to write scripts like this: > > > > load "http://www.fedex.com/Tracking" > > find form > > enter "792544024753" > > submit Looks a whole lot like AppleScript: using terms from application "Address Book" =09on action property =09=09return "address" =09end action property =09 =09on action title for thePerson with theAddress =09=09return "Im Stadtplandienst zeigen" =09end action title =09 =09on should enable action for thePerson with theAddress =09=09return true =09end should enable action =09 =09on perform action for thePerson with theAddress =09=09tell application "Address Book" =09=09=09set z to zip of theAddress =09=09=09set c to city of theAddress =09=09=09set s to street of theAddress =09=09end tell =09=09tell application "Safari" =09=09=09set browser to make new document =09=09=09tell browser =09=09=09=09set URL to "http://www.stadtplandienst.de/" =09=09=09end tell =09=09=09delay 2 -- give Safari a little time to load the page =09=09=09do JavaScript "document.forms[0].elements[\"plz\"].value =3D \"" &= z & "\";" in document 1 =09=09=09do JavaScript "document.forms[0].elements[\"city\"].value =3D \"" = & c & "\";" in document 1 =09=09=09do JavaScript "document.forms[0].elements[\"str\"].value =3D \"" &= s & "\";" in document 1 =09=09=09do JavaScript "document.forms[0].submit()" in document 1 =09=09end tell =09=09return true =09end perform action end using terms from (courtesy http://rsvp.atsites.de/discuss/msgReader$236 ) -Jack