Jump to content
The simFlight Network Forums

KeySends


Recommended Posts

Dear Pete,

next day, next problem :D

Today i tried getting FreeFD working with keysends. I tried the whole day, read you manual but i couldn´t get it work.

The problem is that wideFS sends the commands but the client does not know to which window it has to transfer the command. The command only arrives when that window is active. So i tried with the ClassNames, an example: keysend1=117,8,Glut,"ND 0.6"

Glut is the classname (all the freefd windows have that name) and ND 0.6 is the program name.

The second try was:

; -----------------------------------------------

[user]

Log=Errors+

Run1=c:\programme\freefd\eadi.exe

run2=c:\programme\freefd\nd.exe

run3=c:\programme\freefd\eicas.exe

run4=c:\programme\freefd\boeing_stby.exe

Keysend1=109,8,runkey2

KeySend2=107,8,runkey2

Keysend3=87,8,runkey1

Keysend4=83,8,runkey3

The programs all start, OK. But the problem is the same, only the active window can receive commands.

I think there is something wrong, hmm...

Can you help me? Perhaps you can write down an example how it has to look?

Thank you very much.

Greets from Stuttgart,

Tobi

Link to comment
Share on other sites

Run1=c:\programme\freefd\eadi.exe

run2=c:\programme\freefd\nd.exe

run3=c:\programme\freefd\eicas.exe

run4=c:\programme\freefd\boeing_stby.exe

Keysend1=109,8,runkey2

KeySend2=107,8,runkey2

Keysend3=87,8,runkey1

Keysend4=83,8,runkey3

Where does this "runkey" parameter come in? Didn't you read the documentation:

Running and stopping programs via KeySend requests

The KeySend facility can also accept any of these keywords after the KeySend=:

RunKeyN, CloseKeyN, RunReadyN, CloseReadyN, RunN, CloseN

This allows you to program KeySends to allow any of the programs, known to WideClient through these keywords (see earlier), to be started or stopped by key or button press, from anywhere in the system. For the Run variants to work the program must have been specified by that parameter, for the Close variants to work, that Close parameter must be present with the “Yes” setting.

In other words you can do

RunKey1=c:\programme\freefd\eadi.exe

and

Keysend3=runkey1

and that KeySend will run "eadi.exe" when sent from FSUIPC!

Starting and Stopping programs isn't what you want at all, so why are you copying parameters blindly out of a section about how to do that?

Why not, instead, read this part:

Directing Key Strokes more precisely

If the application that is to receive the keystroke is not a child window of Flight Simulator (i.e. of WideClient, which is substituting for FS in this case), the Windows keyboard focus may not allow the assigned keystroke to reach it. In this case you need to add another parameter, or maybe two, to each KeySend line, identifying the program to receive it.

If the program is one you are having WideClient load, using the Run or RunReady parameters, then the additional parameter can simply be the name of the parameter you used. For example:

KeySend1=65,9,Run1

and KeySend1=66,9,RunReady2

This is bar far the easiest and, usually, the most reliable way.

There are even examples there for you to see, in black and white! So, for one of your programs:

Run1=c:\programme\freefd\eadi.exe

and

Keysend3=87,8,Run1

See how the "Run1" parameter matches the parameter telling it which program to send it to? What could be easier? It does say "this is by far the easiest and, usually, the most reliable way." (or, at least, it does now after I corrected the "bar far" to "by far"! ;-) )

Please do read the documentation a little more slowly. You are making things much harder than they really are.

Regards

Pete

Link to comment
Share on other sites

oh, ok... Now i see. It´s really easier than i thought.

Yes i have to read slowlier, but i think the problem is, when you read a manual and you can´t understand 100%, only 98%, then such things come out..

Thank you Pete for your great help!

Greets,

Tobi

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.