How do I control a Java applet in my browser from Rev?
Jim Ault
JimAultWins at yahoo.com
Wed Dec 14 18:25:02 EST 2005
Dennis, you said
> I thought Safari would have been more scriptable.
There is a difference between 'recordable' and "scriptable' where Safari is
amazingly scriptable. The key to your solution may be the following:
You might want to check the Applescript dictionary for Safari for
Do Javascript command
this will send a JavaScript command to the active browser window and active
tab in that window. This could be a 'one-liner'.
A more complictated way is to use UI Elements (User Interface Elements)
which are quite resplendent in Safari. You can even get the text string
that is in a static text piece in a java applet!
I have not done this myself, but this should be the framework plus a few
details......
Try along these lines:
Transcript code
open Safari, go url 'stock page', store the name of the window(or window ID)
----build the javascript command
put "beginning chars "& \
quote & "quotedStr" & quote & \
" end chars" into javaStrMadeInRev
---------- done building the javascript command
put "tell app ""e&"Safari""e into cmd
--optional could be "activate window id "& theStockTickerID
--optional could be "activate window "& theStockTickerName
put cr & "do javascript "& quote & javaStrMadeInRev & quote after cmd
put cr & "end tell" after cmd
do cmd as applescript
put the result into answerFromSafariWhichShouldBeThePriceILike
HTH
Jim Ault
Las Vegas
On 12/14/05 10:35 AM, "Dennis Brown" <see3d at writeme.com> wrote:
> Tom,
>
> I was surprised that it did not, but the docs says that it will not
> do that. If I clicked in the Finder areas, it only recorded that I
> selcted the Finder. It did not record anything when I clicked on
> other applications. I thought Safari would have been more scriptable.
>
> Dennis
>
> On Dec 14, 2005, at 1:12 PM, Thomas McGrath III wrote:
>
>> Dennis,
>>
>> The recording function -- Are you able to at least record a click
>> at the button location?
>>
>> Tom
>>
>> On Dec 14, 2005, at 1:00 PM, Dennis Brown wrote:
>>
>>> I also tried Automator and tried the recording function in
>>> Applescript Studio, but no good.
>>
>> Thomas J McGrath III
>> 3mcgrath at adelphia.net
>>
>> Semantic Compaction Systems
>> SCIconics, LLC
>>
>> Lazy River Metal Arts
>> Lazy River Software
>> &
>> Meeting Wear - Unique Apparel Design
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list