On 10/7/05, Dimitry Golubovsky <[EMAIL PROTECTED]> 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"
        on action property
                return "address"
        end action property
        
        on action title for thePerson with theAddress
                return "Im Stadtplandienst zeigen"
        end action title
        
        on should enable action for thePerson with theAddress
                return true
        end should enable action
        
        on perform action for thePerson with theAddress
                tell application "Address Book"
                        set z to zip of theAddress
                        set c to city of theAddress
                        set s to street of theAddress
                end tell
                tell application "Safari"
                        set browser to make new document
                        tell browser
                                set URL to "http://www.stadtplandienst.de/";
                        end tell
                        delay 2 -- give Safari a little time to load the page
                        do JavaScript 
"document.forms[0].elements[\"plz\"].value = \"" & z
& "\";" in document 1
                        do JavaScript 
"document.forms[0].elements[\"city\"].value = \"" & c
& "\";" in document 1
                        do JavaScript 
"document.forms[0].elements[\"str\"].value = \"" & s
& "\";" in document 1
                        do JavaScript "document.forms[0].submit()" in document 1
                end tell
                return true
        end perform action
end using terms from

(courtesy http://rsvp.atsites.de/discuss/msgReader$236 )

-Jack

Reply via email to