Send Keys

2006-05-16 Thread Todd Geist

Todd

Any one know of a way to send keystrokes from Rev.  I know I can use  
GUI scripting on OSX but that has some problems in the instance I  
need it in, plus I need Xplat.



TIA

--

Todd Geist
__
g e i s t   i n t e r a c t i v e

___
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: Send Keys

2006-05-16 Thread Todd Geist
this is old and somehow got burped back into the list.  Feel free  
to ignore :)



On May 10, 2006, at 6:47 PM, Todd Geist wrote:


Todd

Any one know of a way to send keystrokes from Rev.  I know I can  
use GUI scripting on OSX but that has some problems in the instance  
I need it in, plus I need Xplat.



TIA

--

Todd Geist
__
g e i s t   i n t e r a c t i v e

___
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


--

Todd Geist
__
g e i s t   i n t e r a c t i v e

___
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: Send Keys

2006-05-12 Thread Ken Ray
On 5/11/06 2:19 PM, Todd Geist [EMAIL PROTECTED] wrote:

 The target application is already running and it may have a dialog
 open when I begin my process.  So far I have found the only way to do
 anything is to use mouse clicks.  This sucks!
 
 How I yearn for something like QuickKeys but in Rev.

I don't suppose you can use both, can you? Last time I looked, QuickKeys was
scriptable, so you could tell QK to do things from Rev... of course that was
several years ago...


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

___
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: Send Keys

2006-05-12 Thread Todd Geist


On May 12, 2006, at 12:00 PM, Ken Ray wrote:


How I yearn for something like QuickKeys but in Rev.


I don't suppose you can use both, can you? Last time I looked,  
QuickKeys was
scriptable, so you could tell QK to do things from Rev... of course  
that was

several years ago...


Yes you can do this, but I would like to distribute this application  
commercially, so that really won't work for me.  Now if Quick Keys  
just had a player that you could license that would be great!  Maybe  
I should ask them,  hmmm.




Todd


--

Todd Geist
__
g e i s t   i n t e r a c t i v e

___
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: Send Keys

2006-05-11 Thread Rob Cozens

Hi Todd,


Any one know of a way to send keystrokes from Rev.


Check out the Type command.

Rob Cozens
CCW, Serendipity Software Company

And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee.

from The Triple Foole by John Donne (1572-1631)

___
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: Send Keys

2006-05-11 Thread Todd Geist

Thanks Rob

But I wasn't very clear.  I need to send key stroke from Rev to  
another app.  Both type and click only work within the current  
Rev stack.


I really need this QuickKeys like functionality.

Unfortunately I have been unable to get GUI scripting on OSX to do  
what I need either.  It is very frustrating  :(


Todd


On May 11, 2006, at 7:13 AM, Rob Cozens wrote:


Hi Todd,


Any one know of a way to send keystrokes from Rev.


Check out the Type command.


--

Todd Geist
__
g e i s t   i n t e r a c t i v e

___
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: Send Keys

2006-05-11 Thread Mark Smith

Is the other app applescriptable?

best,

Mark

On 11 May 2006, at 15:35, Todd Geist wrote:


Thanks Rob

But I wasn't very clear.  I need to send key stroke from Rev to  
another app.  Both type and click only work within the current  
Rev stack.


I really need this QuickKeys like functionality.

Unfortunately I have been unable to get GUI scripting on OSX to do  
what I need either.  It is very frustrating  :(


Todd



___
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: Send Keys

2006-05-11 Thread Jim Ault
I use QuicKeys since Rev is not a system event app.  The Xplat is the major
issue for me.  The GUI scripting has its own promise+limitations.  I only
plan to use GUI to read the buttons and fields on a java applet in Safari to
provide feedback for programmatic decision making.  This info will find it
way to an OSX app or a WinXP app via ftp relay.

Jim Ault
Las Vegas

On 5/10/06 6:47 PM, Todd Geist [EMAIL PROTECTED] wrote:

 Todd
 
 Any one know of a way to send keystrokes from Rev.  I know I can use
 GUI scripting on OSX but that has some problems in the instance I
 need it in, plus I need Xplat.


___
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: Send Keys

2006-05-11 Thread Russ McBride



I've been able to send keystrokes into just about any field using a  
combination of the David Lloyd's Extra Suites

http://osaxen.com/files/extrasuites1.1.html

and Prefab's UI Browser (to help you figure out what object you are  
trying to control)

http://www.prefab.com/uibrowser/
Apple has a similar tool for UI browsing but as I recall this worked  
a bit better.


In cases where there is no object that's registering itself with  
through the usual Objective-C mechanisms you can always just hard  
code in a location and then begin to insert text.  Of course the  
object (text field, e.g.) must actually be at the location for it to  
work.


1.  Don't forget to put the osax library in the right location (I  
think it's /System/Library/ScriptingAdditions/).
2.  Play with the osax commands in a regular applescript editor until  
you know what's going on

3.  Get your working applescript working inside a runrev stack
4.  Enjoy life

Hope that helps,
Russ



Russ McBride
Programmer/Analyst
The Scholar's Workstation
University of California at Berkeley
510-643-6853


On May 11, 2006, at 7:35 AM, Todd Geist wrote:


Thanks Rob

But I wasn't very clear.  I need to send key stroke from Rev to  
another app.  Both type and click only work within the current  
Rev stack.


I really need this QuickKeys like functionality.

Unfortunately I have been unable to get GUI scripting on OSX to do  
what I need either.  It is very frustrating  :(


Todd


On May 11, 2006, at 7:13 AM, Rob Cozens wrote:


Hi Todd,


Any one know of a way to send keystrokes from Rev.


Check out the Type command.


--

Todd Geist
__
g e i s t   i n t e r a c t i v e

___
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: Send Keys

2006-05-11 Thread Todd Geist

Hi

Russ

On May 11, 2006, at 10:14 AM, Russ McBride wrote:

I've been able to send keystrokes into just about any field using a  
combination of the David Lloyd's Extra Suites

http://osaxen.com/files/extrasuites1.1.html


This is basically what I am doing... but it is not fun  :)




and Prefab's UI Browser (to help you figure out what object you are  
trying to control)

http://www.prefab.com/uibrowser/
Apple has a similar tool for UI browsing but as I recall this  
worked a bit better.





I use this to, but I am curious what value does UI Browser have to  
Extra Suites?


I have UI browser and it works great for the GUI scripting, but Extra  
Suite has it's own method for identifying things doesn't it?



Todd

--

Todd Geist
__
g e i s t   i n t e r a c t i v e

___
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: Send Keys

2006-05-11 Thread Russ McBride


Well, AppleScript syntax blows and figuring out the syntax needed to  
reference an object in an unknown object hierarchy blows even  
harder.  UI browser will show you the object hierarchy and also  
generate a reference to the object in Applescript, saving you a lot  
of grief.


It won't be that helpful though if you're trying to script an  
application that is both not applescriptable and was not programmed  
to register it's objects through the normal channels.  I had to write  
a PHP script once that called an Applescript that had to punch a user  
name and password into a crusty old application after opening it.  In  
the end I just figured out the coordinates of the text field and then  
used extrasuites to go to that location and start typing.  Worked  
great.  I thought extra suites was pretty cool.


You should be able to do whatever you need to do even with a  
recalcitrant target application because you can use the finder to  
start the app, and then brute force your way to domination of the  
application using the virtual keyboard and mouse controls.


What are you doing exactly?

Best,
russ



Russ McBride
Programmer/Analyst
The Scholar's Workstation
University of California at Berkeley
510-643-6853


On May 11, 2006, at 10:49 AM, Todd Geist wrote:


Hi

Russ

On May 11, 2006, at 10:14 AM, Russ McBride wrote:

I've been able to send keystrokes into just about any field using  
a combination of the David Lloyd's Extra Suites

http://osaxen.com/files/extrasuites1.1.html


This is basically what I am doing... but it is not fun  :)




and Prefab's UI Browser (to help you figure out what object you  
are trying to control)

http://www.prefab.com/uibrowser/
Apple has a similar tool for UI browsing but as I recall this  
worked a bit better.





I use this to, but I am curious what value does UI Browser have to  
Extra Suites?


I have UI browser and it works great for the GUI scripting, but  
Extra Suite has it's own method for identifying things doesn't it?



___
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: Send Keys

2006-05-11 Thread Todd Geist


On May 11, 2006, at 11:34 AM, Russ McBride wrote:

You should be able to do whatever you need to do even with a  
recalcitrant target application because you can use the finder to  
start the app, and then brute force your way to domination of the  
application using the virtual keyboard and mouse controls.


What are you doing exactly?


I am trying to create an app that works closely with another  
application.  The other application is only partially UI scriptable  
and does not Respond to System Event gui scripts when any dialogs are  
open. Since a big part of what I am trying to do is automate dialogs  
this is a pain.


The target application is already running and it may have a dialog  
open when I begin my process.  So far I have found the only way to do  
anything is to use mouse clicks.  This sucks!


How I yearn for something like QuickKeys but in Rev.

Todd

--

Todd Geist
__
g e i s t   i n t e r a c t i v e

___
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


Send Keys

2006-05-10 Thread Todd Geist

Todd

Any one know of a way to send keystrokes from Rev.  I know I can use  
GUI scripting on OSX but that has some problems in the instance I  
need it in, plus I need Xplat.



TIA

--

Todd Geist
__
g e i s t   i n t e r a c t i v e



--

Todd Geist
__
g e i s t   i n t e r a c t i v e

___
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: Send Keys and Window ID's?

2006-01-01 Thread Garrett Hylltun


On Dec 31, 2005, at 8:16 PM, Sarah Reichelt wrote:


I haven't researched the docs yet, but was just wondering if Rev/DC
is capable of sending key strokes to non-Rev/DC windows.  If yes,
could someone just point me to the command(s) that will get me going?

Also, I'm still a newb to mac and want to know if OSX windows have
id's and or names that I can use to send the key strokes to.



Rev can't do that directly, but most applications can be controlled
with AppleScript. If they are not directly AppleScriptable, you can
use GUI scripting as described here
http://www.apple.com/applescript/uiscripting/.

Write and test your AppleScripts in the AppleScript Script Editor,
then copy then over to Rev, put them in a custom property or a field,
then run them like this:

put the cApplescript of this stack into tScript
-- where cApplescript is the name of the custom property storing  
the script

do tScript as AppleScript

HTH,
Sarah


Hi Sarah,

Thanks for the info.  I'm not sure if this is going to be possible  
then.  I'm trying to setup some hotkeys for my Age of Empires II  
game.  In my MS Windows days, I made a hotkey program that allowed me  
to just hit two keys, and then my program would take care of  
repetitive typing within the game.  In Window, the game does have a  
window id, but I don't know about OSX.  As for being AppleScriptable,  
I some how doubt this game will be cooperative in that sense.  But  
I'll check it out just to see.


Thanks to you and the others who also replied :-)

-Garrett
___
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: Send Keys and Window ID's?

2006-01-01 Thread Sarah Reichelt
 Thanks for the info.  I'm not sure if this is going to be possible
 then.  I'm trying to setup some hotkeys for my Age of Empires II
 game.  In my MS Windows days, I made a hotkey program that allowed me
 to just hit two keys, and then my program would take care of
 repetitive typing within the game.  In Window, the game does have a
 window id, but I don't know about OSX.  As for being AppleScriptable,
 I some how doubt this game will be cooperative in that sense.  But
 I'll check it out just to see.

Yes, I don;t think this strategy will work with AoE. I suggest you
look at Quickeys which is a Mac macro/hotkey program.

Cheers,
Sarah
___
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


Send Keys and Window ID's?

2005-12-31 Thread Garrett Hylltun

Greetings,

I haven't researched the docs yet, but was just wondering if Rev/DC  
is capable of sending key strokes to non-Rev/DC windows.  If yes,  
could someone just point me to the command(s) that will get me going?


Also, I'm still a newb to mac and want to know if OSX windows have  
id's and or names that I can use to send the key strokes to.


Thanks in advance,
-Garrett


___
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: Send Keys and Window ID's?

2005-12-31 Thread Michael D.
Hey Garret
Here's a bit of an answer from something I saved:

Nicolas Cueto wrote:
 Like Jacqueline, I too was going to suggest keyDown
 and keyUp. However I tried it out first myself and
 found that so long as the targeted key is held conti-
 nuously down:

 1. the keyDown message is also generated continu-
 ously. Thus, if the variable for storing the start time
 is being set by the keyDown handler, then that variable
 will be continuously reset. (To resolve this, I tried if
 tTimeVar is not empty then to escape the handler, but
 no luck)

 2. the keyUp message is also being generated. I know
 this because in the keyUp handler I have a put x in field y
 line, which results in the field continuously blinking. (I would've
 thought the keyUp message would be generated only after
 the target key was released?)

 Jacqueline also suggests that these key-handlers might be
 system specific. In which case, I'm on Win2K.

It is OS-specific. On Mac OS X, keyup is only sent once when the key is
released. On Mac OS 9 a keyup is sent immediately after keydown, sort
of like you report.

Here is one way to possibly work around the problem (I liked Phil's
array suggestion):

local tKeyTimes

on rawkeydown k
  if tKeyTimes[k] = 
  then put the milliseconds into tKeyTimes[k]
end rawkeydown

on rawkeyup k
  wait 50 milliseconds -- adjust this as needed
  if keysdown() contains k
  then pass rawkeyup -- they are still holding it
  get tKeyTimes[k]
  if it   then
put the milliseconds - it - 50 into tTimeVar -- holds the timing data
put  into tKeyTimes[k]
  end if
end rawkeyup

I didn't try it on a Windows machine though, so it may need tweaking.

-- 
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
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
- Original Message - 
From: Garrett Hylltun [EMAIL PROTECTED]
To: How to use Revolution use-revolution@lists.runrev.com
Sent: Saturday, December 31, 2005 2:52 PM
Subject: Send Keys and Window ID's?


 Greetings,

 I haven't researched the docs yet, but was just wondering if Rev/DC
 is capable of sending key strokes to non-Rev/DC windows.  If yes,
 could someone just point me to the command(s) that will get me going?

 Also, I'm still a newb to mac and want to know if OSX windows have
 id's and or names that I can use to send the key strokes to.

 Thanks in advance,
 -Garrett


 ___
 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: Send Keys and Window ID's?

2005-12-31 Thread Michael D.
Garrett,
This may help you also, great stuff

http://www.troz.net/Rev/tutorials/KeyCoder.rev.gz

- Original Message - 
From: Garrett Hylltun [EMAIL PROTECTED]
To: How to use Revolution use-revolution@lists.runrev.com
Sent: Saturday, December 31, 2005 2:52 PM
Subject: Send Keys and Window ID's?


 Greetings,

 I haven't researched the docs yet, but was just wondering if Rev/DC
 is capable of sending key strokes to non-Rev/DC windows.  If yes,
 could someone just point me to the command(s) that will get me going?

 Also, I'm still a newb to mac and want to know if OSX windows have
 id's and or names that I can use to send the key strokes to.

 Thanks in advance,
 -Garrett


 ___
 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: Send Keys and Window ID's?

2005-12-31 Thread Sarah Reichelt
 I haven't researched the docs yet, but was just wondering if Rev/DC
 is capable of sending key strokes to non-Rev/DC windows.  If yes,
 could someone just point me to the command(s) that will get me going?

 Also, I'm still a newb to mac and want to know if OSX windows have
 id's and or names that I can use to send the key strokes to.


Rev can't do that directly, but most applications can be controlled
with AppleScript. If they are not directly AppleScriptable, you can
use GUI scripting as described here
http://www.apple.com/applescript/uiscripting/.

Write and test your AppleScripts in the AppleScript Script Editor,
then copy then over to Rev, put them in a custom property or a field,
then run them like this:

put the cApplescript of this stack into tScript
-- where cApplescript is the name of the custom property storing the script
do tScript as AppleScript

HTH,
Sarah
___
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