Sign in to follow this  
Followers 0
autoit3fan

send keys to OS not active window

3 posts in this topic

#1 ·  Posted (edited)

Hiya,

I have a cheapo belkin KVM switch (lets me share use one keyboard, mouse and monitor between 2 comps)

The way it switches computers is by use of a keypress combination

{SCROLLLOCK}{SCROLLLOCK}1

or

{SCROLLLOCK}{SCROLLLOCK}2

where 1 and 2 represent the ID of the computers connected to the other end.

My simple question is, Is is possible for autoit to send this combination so that it is trapped by the switch? At the moment whenever I send this combination using

Send("{SCROLLLOCK toggle}{SCROLLLOCK toggle}1")

The active window is populated with 1 or 2

thanks in advance, and sorry if its a dumb question!

Edited by autoit3fan

Share this post


Link to post
Share on other sites



You could try:

ControlSend('Program Manager', '', '', '{SCROLLLOCK toggle}{SCROLLLOCK toggle}1')
(I have no idea if this would work).


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Hiya,

I have a cheapo belkin KVM switch (lets me share use one keyboard, mouse and monitor between 2 comps)

The way it switches computers is by use of a keypress combination

{SCROLLLOCK}{SCROLLLOCK}1

or

{SCROLLLOCK}{SCROLLLOCK}2

where 1 and 2 represent the ID of the computers connected to the other end.

My simple question is, Is is possible for autoit to send this combination so that it is trapped by the switch? At the moment whenever I send this combination using

Send("{SCROLLLOCK toggle}{SCROLLLOCK toggle}1")

The active window is populated with 1 or 2

thanks in advance, and sorry if its a dumb question!

I would be very surprised if that was possible. When AutoIT sends a keystroke, it writes to a software keyboard buffer using API's from OS, etc., without actually interfacing to the real keyboard at all. Most KVM switches have the keyboard physically plugged into them and get to catch hotkey actions like "{SCROLLLOCK}{SCROLLLOCK}2" on the wire before it even gets to the PS2 or USB port on the computer. The OS never sees these hotkey sequences becuase they are picked off the wire before it gets there.

:whistle:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0