Hi,
I have a simple web page (see html at the bottom of the email) it contains an applet that is used to generate a test string. (Its actually a text representation of a chemical structure called a SMILES string).
What I want is to pass the SMILES to an applescript.
I tried this script to no avail.
All help welcome,
Thanks
Chris
tell application "Safari" activate
set the_SMILES to do _javascript_ " var drawing = document.JME.smiles(); document.form.smi.value = drawing; return drawing;"
display dialog the_SMILES
end tell
HTML for page
<HTML> <HEAD> <TITLE>JME Example 1</TITLE>
<SCRIPT LANGUAGE="_javascript_">
function getSmiles() { var drawing = document.JME.smiles(); document.form.smi.value = drawing; }
</SCRIPT>
</HEAD> <BODY BGCOLOR="#FFFFFF">
<center>
<H2>Test SMILES</H2>
<applet code="JME.class" name="JME" archive="JME.jar" width=360 height=315> You have to enable Java and JavaScritpt on your machine ! </applet>
<FORM METHOD="POST" NAME="form" > <p> <b>smiles</b><BR> <INPUT TYPE="text" NAME="smi" SIZE=48"><BR> </p> <INPUT TYPE="button" VALUE="Get SMILES" >
</form>
</center>
</BODY> </HTML>
|