Discussion:
Simulating Keystrokes
Bridger Maxwell
2006-09-29 14:34:04 UTC
Permalink
Hey,
I know I can simulate keystrokes from Revolution to my stack by sending
the keyDown message, but is there any way to send keystrokes to the system
or to other programs? I would like to send keystrokes like "F9" to activate
expose, but it would be very nice to be able to send any keystroke.

TTFN
Bridger
Peter T. Evensen
2006-09-29 14:51:02 UTC
Permalink
You can also use the command type to simulate keystrokes. But that doesn't
answer your question (I just thought I'd through this out there as it is
another way to do simulated keystrokes).

You could probably do it with AppleScript. It probably has a mechanism to
send keystrokes, or at least activate expose.
Post by Bridger Maxwell
Hey,
I know I can simulate keystrokes from Revolution to my stack by sending
the keyDown message, but is there any way to send keystrokes to the system
or to other programs? I would like to send keystrokes like "F9" to activate
expose, but it would be very nice to be able to send any keystroke.
TTFN
Bridger
_______________________________________________
use-revolution mailing list
Please visit this url to subscribe, unsubscribe and manage your
http://lists.runrev.com/mailman/listinfo/use-revolution
Peter T. Evensen
http://www.PetersRoadToHealth.com
314-629-5248 or 888-682-4588
Mark Schonewille
2006-09-29 16:34:16 UTC
Permalink
Hi Bridger,

On Mac OS X, you could use AppleScript GIU scripting.

Best,

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Get your store on-line within minutes with Salery Web Store software.
Download at http://www.salery.biz
Post by Bridger Maxwell
Hey,
I know I can simulate keystrokes from Revolution to my stack by sending
the keyDown message, but is there any way to send keystrokes to the system
or to other programs? I would like to send keystrokes like "F9" to activate
expose, but it would be very nice to be able to send any keystroke.
TTFN
Bridger
Dar Scott
2006-09-29 18:02:32 UTC
Permalink
Post by Mark Schonewille
On Mac OS X, you could use AppleScript GIU scripting.
Windows has WSH, the windows scripting host that can handle scripting
in several languages with VBBcript and JScript built in. Any of the
languages have access to the object WSHShell which has the method
SendKeys. You might have to activate the window. I don't think
these are recognized by 'do', so you will need to use shell() with
cscript. You can probably find examples of the script you need online.

I have seen some tools around.

And you can make an external.

I don't know the situation if the app should not be brought forward.

To simulate sending a control-alt-del, start the task manager. I
think you can send the rest to a process.

Dar
Bridger Maxwell
2006-09-29 18:21:07 UTC
Permalink
Hey,
Thanks for all the suggestions. I think that should work for what I am
doing, but I was wondering if there was any way to send keystrokes so it
seems to the system to be coming from the keyboard. I realize this would
probably be a security hole, but I have seen programs, at least on windows,
that can simulate any keystroke as if it was coming from the keyboard. Is
AS GUI commands as versatile?

TTFN
Bridger
Dar Scott
2006-09-29 19:13:25 UTC
Permalink
Post by Bridger Maxwell
I was wondering if there was any way to send keystrokes so it
seems to the system to be coming from the keyboard.
You should be able to insert keystrokes into the HID stream on XP
with an external. To get lower, you can replace the keyboard driver.

I'm not sure what "seems to the system" means. Do you have something
in particular in mind?

I think the start menu and bar are windows and you can send
keystrokes to them with SendKeys().

Dar Scott

Continue reading on narkive:
Loading...