Re: AppleScript to react to buttonpress on webpage
Re: AppleScript to react to buttonpress on webpage
- Subject: Re: AppleScript to react to buttonpress on webpage
- From: JJ <email@hidden>
- Date: Thu, 29 Nov 2001 22:54:50 +0100
>
I need to write an application that:
If you're talking about CGI, then omit the rest of this msg.
>
1) detects if a person is on a particular page on a web-site. (This page
>
tells the user what their username/password is, and has a "connect" button
>
underneath the text.)
I don't know what do you mean... This "detect" is in user-computer, not on
your server, ?OK? All scriptable navigators can tell you the current URL.
No problems. Simply check the dictionaries.
>
2) parses the page for the username/password text that's displayed
"Parses"? Is this "get" the related username/password? IE can "GetSource".
Other navigators can "download" the page, and then read it.
>
3) passes those two variables as parameters to a Unix shell script when the
>
user hits the "connect" button on that web-page.
Weeks ago I wrote an applescript-javascript library for Internet Explorer
(MSIE Library). You can look for it at MacScripter.net. It promises full
control over web page forms. So, you could prompt the user: Do you wish
"Connect" now? And, if "yes", submit yourself the form (click it).
>
I know that AppleScript can parse the html content within a webpage. The
>
problem I'm having is how to create a button on that web-page that
>
AppleScript can react to. Can JavaScript/AppleScript talk to each other?
JavaScript and JScript, under IE, returns its results as string. A sample:
tell IE
do script "document.images[0].complete"
end tell
-- must return if first image is loaded: "TRUE" or "FALSE"
-- (if exists any image. Otherwise, you'll receive, an IE alert)
JJ