D
David
Safari under Mac OSX accepts a "Execute Javascript" apple event. Thus,
you can send an event to if from another application (or from the
Scripts menu).
I would like an event that does the equivalent of "set selection", so I
can fill in some text in a text entry box. In particular, I have a visa
card number stored in the Keychain database. I retrieve it with an
Applescript, then would like to execute the equivalent of "do
javascript "document.setSelection('1234-3456-4567-5678');"
I do not know Javascript and have not tripped over anything that looks
promising to do this. What I need is the syntax (if this is even
possible!) for the document.setSelection" command. What I want this to
do is output the text where the cursor currently is. [I can do this now
with as outputting keystrokes, but that is just so ugly!]
Any help would be greatly appreciated.
David
PS: if you want to contact me directly, I'm on mac.com with user name
dhoerl
you can send an event to if from another application (or from the
Scripts menu).
I would like an event that does the equivalent of "set selection", so I
can fill in some text in a text entry box. In particular, I have a visa
card number stored in the Keychain database. I retrieve it with an
Applescript, then would like to execute the equivalent of "do
javascript "document.setSelection('1234-3456-4567-5678');"
I do not know Javascript and have not tripped over anything that looks
promising to do this. What I need is the syntax (if this is even
possible!) for the document.setSelection" command. What I want this to
do is output the text where the cursor currently is. [I can do this now
with as outputting keystrokes, but that is just so ugly!]
Any help would be greatly appreciated.
David
PS: if you want to contact me directly, I'm on mac.com with user name
dhoerl