Re: How do I control a Java applet in my browser from Rev?

2005-12-15 Thread Mark Smith

Dennis, send me the HTML, and I'll see if I can make any sense of it...

Best,

Mark

On 15 Dec 2005, at 02:58, Dennis Brown wrote:


Mark, Tom, Jim, Terry, Xavier,

Thanks for all your suggestions.  I thought there was going to be a  
simple answer when I ask it.  The good news is that it appears to  
be in the realms of doablity.  The bad news is that I have avoided  
learning Applescript and Javascript until now.  Yet I am willing to  
at least put my big toe in the water if that is what it takes.


I am looking at the source HTML with some Javascript for the page  
in question right now.  I can see that the page source is created  
just for me, because it has URL's and passwords for me embedded  
into text constants.  It seems to have some interesting definitions  
in it that leads me to believe that the field I want to input to is  
accessible through the page source.  Since the page is full of URLs  
as to where to find things on the server, I figure it would break  
soon if I just took the script and changed the parts I want to.  I  
have hacked it to remove all the extraneous stuff like Ads, etc. to  
get the source down to readable size --a couple of pages --it even  
still sort of works.


I think if I could change the values of the following params that  
are in the Javascript, it might work:


  param name=SYMBOL value=NASDAQ: /
  param name=SymbolChange value=1 /

I would just grab the HTML into a file and edit it on the fly, but  
reloading the page causes the script to take a long time to start  
up, and it does not save the chart settings --they all revert to  
startup defaults.  So my best bet is changing these parameters  
while it is running.


Am I on the right track here?

I could email the HTML source to someone if you would not mind  
taking a quick look at it to see if this approach is likely to  
work.  (I changed the password, but it still runs --just won't  
connect for the real quote data).


Dennis

On Dec 14, 2005, at 6:53 PM, Mark Smith wrote:

A useful thing can also be to store your applescripts in custom  
properties, with place-holders for values and then:


put the myApplescript of me into tScript
replace placeholder with value in tScript
do tScript as applescript


an example (including a bit of javaScript):

a custom property called jsSetAndGetAS contains:

set tScr to 
document.ResultSel.Day.selectedIndex = dd;
document.ResultSel.Month.selectedIndex = mm;
document.ResultSel.Year.selectedIndex = yy;
ResultsSubmit()

tell application Safari
do JavaScript tScr in document 1
end tell

and then in my app I have

put the jsSetAndGetAS of me into tScript
replace dd with dayOfMonth() in tScript
replace mm with MonthNum() in tScript
replace yy with getYear() in tScript

do tScript as applescript


building applescripts in a rev script can get hard to read.

Cheers,

Mark

On 14 Dec 2005, at 23:25, Jim Ault wrote:


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 quoteSafariquote 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 [EMAIL PROTECTED] 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
[EMAIL PROTECTED]

Semantic Compaction 

RE: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread MisterX
Dennis,

you might need a Macro program to do that. A macro, like QuickKeys can
handle this easily and they are usually apple-scriptable. 

Record the macro-sequence. Give it a name and then 

do thismacroname as QuickKeys  -- or as Applescripts maybe...

im out of the mac circle but I know that worked.

To insert custom text... you can have rev generate it and put it into the
clipboard before your macro goes paste it into the java field...

Mileage may vary depending on Macro program (QuickKeys is top notch)...
I owned QK since 1.0 and there is few other more helpful or easy to use
programs like it. There's even a windows version!

cheers
Xavier
http://monsieurx.com/taoo

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Dennis Brown
 Sent: Wednesday, 14 December, 2005 17:20
 To: How to use Revolution
 Subject: How do I control a Java applet in my browser from Rev?
 
 Hi Control Experts!
 
 I am running OS X 10.4 with Safari.  I have a real time 
 streaming stock graphing applet for a service that I 
 subscribe to.  It has a field to enter the stock symbol and a 
 submit button.  I would like to  
 have Rev send the symbol to the field and punch the submit button.   
 Only problem, is that I don't have the foggiest idea about 
 how to go about doing that.  Anyone have any ideas?
 
 Thanks,
 Dennis
 ___
 use-revolution mailing list
 use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Thomas McGrath III

Dennis,

I would see if the streaming stock app is Applescript-able. If it is  
then REV can do this for you using Applescript. The newest version of  
Applescript has a lot of new features including clicking at a buttons  
location and support for apps that do not have much applescript support.


Check out Applescript's website for more info:
Resources:
http://www.apple.com/applescript/resources/

Applescript Studio:
http://www.apple.com/applescript/studio/

Online Docs for Apps:
http://www.apple.com/applescript/apps/

HTH

Tom

On Dec 14, 2005, at 11:20 AM, Dennis Brown wrote:


Hi Control Experts!

I am running OS X 10.4 with Safari.  I have a real time streaming  
stock graphing applet for a service that I subscribe to.  It has a  
field to enter the stock symbol and a submit button.  I would like  
to have Rev send the symbol to the field and punch the submit  
button.  Only problem, is that I don't have the foggiest idea about  
how to go about doing that.  Anyone have any ideas?


Thanks,
Dennis
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


Thomas J McGrath III
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Dennis Brown

Tom,

I did check for this.  The Java applet runs inside a browser.  There  
are no Applescript commands to control it that I can tell.  I also  
tried Automator and tried the recording function in Applescript  
Studio, but no good.


Thanks,
Dennis

On Dec 14, 2005, at 12:14 PM, Thomas McGrath III wrote:


Dennis,

I would see if the streaming stock app is Applescript-able. If it  
is then REV can do this for you using Applescript. The newest  
version of Applescript has a lot of new features including clicking  
at a buttons location and support for apps that do not have much  
applescript support.


Check out Applescript's website for more info:
Resources:
http://www.apple.com/applescript/resources/

Applescript Studio:
http://www.apple.com/applescript/studio/

Online Docs for Apps:
http://www.apple.com/applescript/apps/

HTH

Tom

On Dec 14, 2005, at 11:20 AM, Dennis Brown wrote:


Hi Control Experts!

I am running OS X 10.4 with Safari.  I have a real time streaming  
stock graphing applet for a service that I subscribe to.  It has a  
field to enter the stock symbol and a submit button.  I would like  
to have Rev send the symbol to the field and punch the submit  
button.  Only problem, is that I don't have the foggiest idea  
about how to go about doing that.  Anyone have any ideas?


Thanks,
Dennis
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


Thomas J McGrath III
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Thomas McGrath III

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
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Dennis Brown

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
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Dennis Brown

Mark,

Yes they do have an API for streaming applications, but you have to  
pay dearly for the use of it each month.  For the low cost (about $13/ 
month) service, they confine you to using their limited functionality  
browser (Java) interface.


Dennis

On Dec 14, 2005, at 1:12 PM, Mark Smith wrote:

Dennis, have you contacted the supplier to ask if they have an API  
that would enable you to link a rev app directly to their service?  
They might have such a thing based on Soap/XML or somesuch that you  
could work with.


Mark

On 14 Dec 2005, at 18:00, Dennis Brown wrote:


Tom,

I did check for this.  The Java applet runs inside a browser.   
There are no Applescript commands to control it that I can tell.   
I also tried Automator and tried the recording function in  
Applescript Studio, but no good.


Thanks,
Dennis

On Dec 14, 2005, at 12:14 PM, Thomas McGrath III wrote:


Dennis,

I would see if the streaming stock app is Applescript-able. If it  
is then REV can do this for you using Applescript. The newest  
version of Applescript has a lot of new features including  
clicking at a buttons location and support for apps that do not  
have much applescript support.


Check out Applescript's website for more info:
Resources:
http://www.apple.com/applescript/resources/

Applescript Studio:
http://www.apple.com/applescript/studio/

Online Docs for Apps:
http://www.apple.com/applescript/apps/

HTH

Tom

On Dec 14, 2005, at 11:20 AM, Dennis Brown wrote:


Hi Control Experts!

I am running OS X 10.4 with Safari.  I have a real time  
streaming stock graphing applet for a service that I subscribe  
to.  It has a field to enter the stock symbol and a submit  
button.  I would like to have Rev send the symbol to the field  
and punch the submit button.  Only problem, is that I don't have  
the foggiest idea about how to go about doing that.  Anyone have  
any ideas?


Thanks,
Dennis
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


Thomas J McGrath III
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Thomas McGrath III

Dennis,

Yeah, it must be safari or that fact it is a web app. I did  
successfully record a menu item and screen button in a non apple  
scriptable app but was nervous with that as a solution cause the  
button/window could be moved.


Will keep looking.

Tom

On Dec 14, 2005, at 1:35 PM, Dennis Brown 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
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


Thomas J McGrath III
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Mark Smith

Ah, that old up-the-price trick. A shame :(

Mark

On 14 Dec 2005, at 18:40, Dennis Brown wrote:


Mark,

Yes they do have an API for streaming applications, but you have to  
pay dearly for the use of it each month.  For the low cost (about  
$13/month) service, they confine you to using their limited  
functionality browser (Java) interface.


Dennis

On Dec 14, 2005, at 1:12 PM, Mark Smith wrote:

Dennis, have you contacted the supplier to ask if they have an API  
that would enable you to link a rev app directly to their service?  
They might have such a thing based on Soap/XML or somesuch that  
you could work with.


Mark

On 14 Dec 2005, at 18:00, Dennis Brown wrote:


Tom,

I did check for this.  The Java applet runs inside a browser.   
There are no Applescript commands to control it that I can tell.   
I also tried Automator and tried the recording function in  
Applescript Studio, but no good.


Thanks,
Dennis

On Dec 14, 2005, at 12:14 PM, Thomas McGrath III wrote:


Dennis,

I would see if the streaming stock app is Applescript-able. If  
it is then REV can do this for you using Applescript. The newest  
version of Applescript has a lot of new features including  
clicking at a buttons location and support for apps that do not  
have much applescript support.


Check out Applescript's website for more info:
Resources:
http://www.apple.com/applescript/resources/

Applescript Studio:
http://www.apple.com/applescript/studio/

Online Docs for Apps:
http://www.apple.com/applescript/apps/

HTH

Tom

On Dec 14, 2005, at 11:20 AM, Dennis Brown wrote:


Hi Control Experts!

I am running OS X 10.4 with Safari.  I have a real time  
streaming stock graphing applet for a service that I subscribe  
to.  It has a field to enter the stock symbol and a submit  
button.  I would like to have Rev send the symbol to the field  
and punch the submit button.  Only problem, is that I don't  
have the foggiest idea about how to go about doing that.   
Anyone have any ideas?


Thanks,
Dennis
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


Thomas J McGrath III
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@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@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Thomas McGrath III
I've seen that too. Maybe there are third party apps that can do the  
lookups for you. I did find other apps for my stock lookups.



Tom

On Dec 14, 2005, at 1:40 PM, Dennis Brown wrote:


Mark,

Yes they do have an API for streaming applications, but you have to  
pay dearly for the use of it each month.  For the low cost (about  
$13/month) service, they confine you to using their limited  
functionality browser (Java) interface.


Dennis

On Dec 14, 2005, at 1:12 PM, Mark Smith wrote:

Dennis, have you contacted the supplier to ask if they have an API  
that would enable you to link a rev app directly to their service?  
They might have such a thing based on Soap/XML or somesuch that  
you could work with.


Mark

On 14 Dec 2005, at 18:00, Dennis Brown wrote:


Tom,

I did check for this.  The Java applet runs inside a browser.   
There are no Applescript commands to control it that I can tell.   
I also tried Automator and tried the recording function in  
Applescript Studio, but no good.


Thanks,
Dennis

On Dec 14, 2005, at 12:14 PM, Thomas McGrath III wrote:


Dennis,

I would see if the streaming stock app is Applescript-able. If  
it is then REV can do this for you using Applescript. The newest  
version of Applescript has a lot of new features including  
clicking at a buttons location and support for apps that do not  
have much applescript support.


Check out Applescript's website for more info:
Resources:
http://www.apple.com/applescript/resources/

Applescript Studio:
http://www.apple.com/applescript/studio/

Online Docs for Apps:
http://www.apple.com/applescript/apps/

HTH

Tom

On Dec 14, 2005, at 11:20 AM, Dennis Brown wrote:


Hi Control Experts!

I am running OS X 10.4 with Safari.  I have a real time  
streaming stock graphing applet for a service that I subscribe  
to.  It has a field to enter the stock symbol and a submit  
button.  I would like to have Rev send the symbol to the field  
and punch the submit button.  Only problem, is that I don't  
have the foggiest idea about how to go about doing that.   
Anyone have any ideas?


Thanks,
Dennis
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


Thomas J McGrath III
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


Thomas J McGrath III
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Terry Judd
I almost certain that you're not going to have any joy going down this 
(applescript) path but to script the normally 'unscriptable' app in OSX 
you need to:
(i) turn on 'enable access for assistive devices' in the 'universal 
access' pane of 'system preferences'
(ii) get a copy of 'UI Element Inspector' (available from the Apple web 
site) or even better 'UI Browser' (from PreFab software - 
www.prefab.com) so that you can 'inspect' whatever it is you're trying 
to capture
(iii) use the info you get back from (ii) to construct some foxy 
Applescript


My feeling is that a Java applet wont even register but if you want to 
try it then use Safari rather than Firefox as the latter's interface 
gets rendered as a single non-deconstructable (surely that isn't a 
word) object.


Cheers,

Terry...


From: Thomas McGrath III [EMAIL PROTECTED]
Date: 15 December 2005 5:55:48 AM
To: How to use Revolution use-revolution@lists.runrev.com
Subject: Re: How do I control a Java applet in my browser from Rev?
Reply-To: How to use Revolution use-revolution@lists.runrev.com


Dennis,

Yeah, it must be safari or that fact it is a web app. I did 
successfully record a menu item and screen button in a non apple 
scriptable app but was nervous with that as a solution cause the 
button/window could be moved.


Will keep looking.

Tom

On Dec 14, 2005, at 1:35 PM, Dennis Brown 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.



Dr Terry Judd
Lecturer in Educational Technology (Design)
Biomedical Multimedia Unit
Faculty of Medicine, Dentistry  Health Sciences
The University of Melbourne
Parkville VIC 3052
AUSTRALIA

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Jim Ault
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 quoteSafariquote 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 [EMAIL PROTECTED] 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
 [EMAIL PROTECTED]
 
 Semantic Compaction Systems
 SCIconics, LLC
 
 Lazy River Metal Arts
 Lazy River Software
 
 Meeting Wear - Unique Apparel Design
 
 
 
 
 
 
 ___
 use-revolution mailing list
 use-revolution@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Thomas McGrath III

From the Apple site on this:
Scripters have often requested the ability to control, via  
AppleScript, applications that either do not have AppleScript support  
or are only partially scriptable. Mac OS X v10.3 includes support for  
the control of the computer's graphic user interface via AppleScript.
Graphic user interface control is performed by an updated version of  
the System Events application. By addressing the System Events  
application, AppleScript scripts can select menu items, push buttons,  
enter text into text fields, and generally control the interfaces of  
most non-Classic applications.


Seems like it should work but maybe it is the fact that the items in  
question are not interface controls.


Tom


On Dec 14, 2005, at 4:53 PM, Terry Judd wrote:


UI Element Inspector


Thomas J McGrath III
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Mark Smith
A useful thing can also be to store your applescripts in custom  
properties, with place-holders for values and then:


put the myApplescript of me into tScript
replace placeholder with value in tScript
do tScript as applescript


an example (including a bit of javaScript):

a custom property called jsSetAndGetAS contains:

set tScr to 
document.ResultSel.Day.selectedIndex = dd;
document.ResultSel.Month.selectedIndex = mm;
document.ResultSel.Year.selectedIndex = yy;
ResultsSubmit()

tell application Safari
do JavaScript tScr in document 1
end tell

and then in my app I have

put the jsSetAndGetAS of me into tScript
replace dd with dayOfMonth() in tScript
replace mm with MonthNum() in tScript
replace yy with getYear() in tScript

do tScript as applescript


building applescripts in a rev script can get hard to read.

Cheers,

Mark

On 14 Dec 2005, at 23:25, Jim Ault wrote:


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 quoteSafariquote 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 [EMAIL PROTECTED] 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
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design






___
use-revolution mailing list
use-revolution@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How do I control a Java applet in my browser from Rev?

2005-12-14 Thread Dennis Brown

Mark, Tom, Jim, Terry, Xavier,

Thanks for all your suggestions.  I thought there was going to be a  
simple answer when I ask it.  The good news is that it appears to be  
in the realms of doablity.  The bad news is that I have avoided  
learning Applescript and Javascript until now.  Yet I am willing to  
at least put my big toe in the water if that is what it takes.


I am looking at the source HTML with some Javascript for the page in  
question right now.  I can see that the page source is created just  
for me, because it has URL's and passwords for me embedded into text  
constants.  It seems to have some interesting definitions in it that  
leads me to believe that the field I want to input to is accessible  
through the page source.  Since the page is full of URLs as to where  
to find things on the server, I figure it would break soon if I just  
took the script and changed the parts I want to.  I have hacked it to  
remove all the extraneous stuff like Ads, etc. to get the source down  
to readable size --a couple of pages --it even still sort of works.


I think if I could change the values of the following params that are  
in the Javascript, it might work:


  param name=SYMBOL value=NASDAQ: /
  param name=SymbolChange value=1 /

I would just grab the HTML into a file and edit it on the fly, but  
reloading the page causes the script to take a long time to start up,  
and it does not save the chart settings --they all revert to startup  
defaults.  So my best bet is changing these parameters while it is  
running.


Am I on the right track here?

I could email the HTML source to someone if you would not mind taking  
a quick look at it to see if this approach is likely to work.  (I  
changed the password, but it still runs --just won't connect for the  
real quote data).


Dennis

On Dec 14, 2005, at 6:53 PM, Mark Smith wrote:

A useful thing can also be to store your applescripts in custom  
properties, with place-holders for values and then:


put the myApplescript of me into tScript
replace placeholder with value in tScript
do tScript as applescript


an example (including a bit of javaScript):

a custom property called jsSetAndGetAS contains:

set tScr to 
document.ResultSel.Day.selectedIndex = dd;
document.ResultSel.Month.selectedIndex = mm;
document.ResultSel.Year.selectedIndex = yy;
ResultsSubmit()

tell application Safari
do JavaScript tScr in document 1
end tell

and then in my app I have

put the jsSetAndGetAS of me into tScript
replace dd with dayOfMonth() in tScript
replace mm with MonthNum() in tScript
replace yy with getYear() in tScript

do tScript as applescript


building applescripts in a rev script can get hard to read.

Cheers,

Mark

On 14 Dec 2005, at 23:25, Jim Ault wrote:


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 quoteSafariquote 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 [EMAIL PROTECTED] 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
[EMAIL PROTECTED]

Semantic Compaction Systems
SCIconics, LLC

Lazy River Metal Arts
Lazy River Software™

Meeting Wear™ - Unique Apparel Design