Jump to content
The simFlight Network Forums

Keysend problem


Recommended Posts

Hi Pete

 

I have the following in my wideclient .ini:

 

[user]
Log=Errors+
KeySend3=RunKey1
RunKey1=c:\fast\fast\fastflightsim.exe
 
and on my FSX PC I assigned Keysend 3 to a button.
 
It works fine after I first run wideclient and press the button on the FSX PC, the program loads fine.
 
Then I manually close the program and try the button again, but nothing, it won't load the program again, only if I close and retart wideclient.
 
I also tried pinning this program on the windows taskbar, from where I can activate it with the windows start button, ie it is the 2nd program on the taskbar so Winkey+2 will open it.  I tried putting in the wideclient ini the following but nothing happened:
 
KeySend3=50,40 (I understand 40 is the winkey)
 
Best
Charles
Link to comment
Share on other sites

Hi,

 

when you start a program (Process) via WideClient, you need to close it as well via WideClient befor you can start it again via WideClient. The reason is that WideClient doesn't see any reason to start the same Process again when it already running and wasn't closed. WideClient remembers that it didn't closed the process and so it believes it is still running.

When you define also a button or key to send the Close function then you will be able to restart the same process again.

Link to comment
Share on other sites

It works fine after I first run wideclient and press the button on the FSX PC, the program loads fine.

 
Then I manually close the program and try the button again, but nothing, it won't load the program again, only if I close and retart wideclient.

 

I see Thomas has answered this part. (Thank you Thomas). 

 

[LATER] Tested here, and it isn't actually so ... see next post.

 

I also tried pinning this program on the windows taskbar, from where I can activate it with the windows start button, ie it is the 2nd program on the taskbar so Winkey+2 will open it.  I tried putting in the wideclient ini the following but nothing happened:
 
KeySend3=50,40 (I understand 40 is the winkey)

 

Winkey isn't an optional shift key in WideClient, at least not for generating and sending -- see the list in the documentation.  The only place it is supported is in the ButtonKeys option, for operating FSUIPC's virtual buttons from the Client keyboard -- i.e. IN rather than OUT.

 

Pete

Link to comment
Share on other sites

I tested exactly the scenario proposed by the OP, using KeySend3, but onviously with a different program, and the program was started correctly every time i used the relevant button notwithstanding the fact that I'd closed the program manually each time.

 

So, something else is going on there. Please check the WideClient.log. Each time it starts a program it logs it, the path then the full pathname. If it couldn't run it there'll be an error message -- and a message box and a beep!

 

To log the actual KeySend reception, to check that, just enable it's logging by using

 

Log=KeySend

 

in the [user] section.

 

Finally, just in case this is some recent change, please be sure you are using an up-to-date version of WideClient -- 6.999 probably with a letter appended (6.999m is the one currently on release).

 

Pete

Link to comment
Share on other sites

Thanks, I just tried again and same problem.  My log files look like this:

 

********* WideClient Log [version 6.999b] Class=FS98MAIN *********
Date (dmy): 07/07/14, Time 22:04:13.191: Client name is CHARLES-4
      234 LUA: "C:\Wideclient\Initial.LUA": not found
      250 Attempting to connect now
      250 Trying TCP/IP host "Newserver" port 8002 ...
      250 ... Okay, IP Address = 192.168.0.115
    21294 Error on client pre-Connection Select() [Error=10060] Connection timed out
    21294 Ready to try connection again
    22324 Attempting to connect now
    53384 Connection made okay!
    53571 Using "C:\Wideclient\GFDEV.DLL", version 2.2.1.0
    63165 c:\fast\fast
    63165 c:\fast\fast\fastflightsim.exe
    63804 New Client Application: "FASTFlightsim" (Id=2112)
 
 
 
 
********* WideClient Log [version 6.999b] Class=FS98MAIN *********
Date (dmy): 07/07/14, Time 22:02:46.664: Client name is CHARLES-4
      281 LUA: "C:\Wideclient\Initial.LUA": not found
      281 Attempting to connect now
     1045 Trying TCP/IP host "Newserver" port 8002 ...
     1045 ... Okay, IP Address = 192.168.0.115
    22074 Error on client pre-Connection Select() [Error=10060] Connection timed out
    22074 Ready to try connection again
    23104 Attempting to connect now
 
    66613 ****** End of session performance summary ******
    66613 Total time connected = 0 seconds
    66613 Reception maximum:  0 frames/sec, 0 bytes/sec
    66613 Transmission maximum:  0 frames/sec, 0 bytes/sec
    66613 Max receive buffer = 0, Max send depth = 0, Send frames lost = 0
 
    66613 ********* Log file closed (Buffers: MaxUsed 0, Alloc 0 Freed 0 Refused 0) *********
 
Link to comment
Share on other sites

Thanks, I just tried again and same problem.  My log files look like this:

 

Okay. So it looks like the second time you press the button, nothing is being received. How have you programmed the button in FSUIPC? Just on Press or on both Press and Release? What sort of button is it?

 

You can easily check whether the KeySend arrives. Please do as I suggested before, i.e.

 

"To log the actual KeySend reception, to check that, just enable it's logging by using

Log=KeySend

in the [user] section.".

 

Pete

 

Link to comment
Share on other sites

The button is a goflight button, I have checked it is working fine on the buttons page of FSUIPC.  I have it programmed as Kesend3 (key press not to be held) and then for release Keysend4, which I have not yet assigned....ah, ha maybe that is the issue? (I will delete this keysend4 and see)

 

I put in the Log=Keysend when I did the last test....I thought the log files above were the result or is the log filed somewhere else? 

 

What I found odd was the line 63165, why it only picked part of the address first or is this normal?

 

63165 c:\fast\fast
    63165 c:\fast\fast\fastflightsim.exe
Link to comment
Share on other sites

I put in the Log=Keysend when I did the last test....I thought the log files above were the result or is the log filed somewhere else? 

 

Ooops! Sorry. I've just noticed. Is a recent logging change to Wideclient I added an option "Log=Keys", and inadvertently inserted the check for that before the one for "Keysend", so it gets that instead. Sorry.

 

Please download WideClient6999n.zip

 

Here's the sort of entries you then get:

 

First use of button:

    15756 d:\myprojects\weatherset2\weatherset2
    15756 D:\MyProjects\eatherSet2\WeatherSet2WeatherSet2.exe
    15756 Checked KeySend[1]=3
 
Second use, with "WeatherSet2" still running
    28018 Program 18, Window = 30E18
    28018 Checked KeySend[2]=3
 
It just shows that the program is found running so doesn't run it again.
Then, third use, but after closing program manually:
 
    51168 d:\myprojects\weatherset2\weatherset2
    51168 D:\MyProjects\eatherSet2\WeatherSet2WeatherSet2.exe
    51168 Checked KeySend[3]=3
 

The numbers in [] are just buffer positions in the keysend offsets -- for further information on these and all KeySend transmissions (as opposed to arrivals), put this line into the [user] section:

 

Monitor=330F,17

 

which logs the actual offsets being used for KeySend.

 
What I found odd was the line 63165, why it only picked part of the address first or is this normal?
 
Not odd. I did tell you -- it first logs the Path, then the full pathname.
 
Pete
Link to comment
Share on other sites

I updated to 6999n and deleted the assignment in FSUIPC on release of the button, so the assignment in FSUIPC is just Kesend and parameter=3.

 

In the wideclient.ini I have the following, I ran the test with Log=Keys but no extra log was produced, so I ran again with Log=Keysend and got the following 2 logs

 

Result was the same, it opens the program the first time I do it, but not the 2nd and after.  I have to close and re-open wideclient for it to work

 

Wideclient ini:

[user]
Log=Errors+
Log=Keysend
KeySend3=RunKey1
RunKey1=c:\fast\fast\fastflightsim.exe
UseSendInput=Yes
 
Logs:
********* WideClient Log [version 6.999n] Class=FS98MAIN *********
Date (dmy): 08/07/14, Time 11:02:29.306: Client name is CHARLES-4
      234 LUA: "C:\Wideclient\Initial.LUA": not found
      250 Attempting to connect now
      266 Trying TCP/IP host "Newserver" port 8002 ...
      266 ... Okay, IP Address = 192.168.0.115
      266 Connection made okay!
      500 Using "C:\Wideclient\GFDEV.DLL", version 2.2.1.0
    15803 c:\fast\fast
    15803 c:\fast\fast\fastflightsim.exe
    16037 New Client Application: "FASTFlightsim" (Id=1764)
 
 
********* WideClient Log [version 6.999n] Class=FS98MAIN *********
Date (dmy): 07/07/14, Time 10:48:09.369: Client name is CHARLES-0
      265 Attempting to connect now
      265 LUA: "\\CHARLES-4\Wideclient\Initial.LUA": not found
     2824 Trying TCP/IP host "Newserver" port 8002 ...
     2824 Error on client gethostbyname() [Error=11004] Valid name, no data record of requested type
 
    35194 ****** End of session performance summary ******
    35194 Total time connected = 0 seconds
    35194 Reception maximum:  0 frames/sec, 0 bytes/sec
    35210 Transmission maximum:  0 frames/sec, 0 bytes/sec
    35210 Max receive buffer = 0, Max send depth = 0, Send frames lost = 0
 
    35210 ********* Log file closed (Buffers: MaxUsed 0, Alloc 0 Freed 0 Refused 0) *********
 
Link to comment
Share on other sites

In the wideclient.ini I have the following, I ran the test with Log=Keys but no extra log was produced

 

Log=Keys is nothing to do with Keysend. I only mentioned when explaining why WideClient was seeing 2KeySend" as "Keys" -- it matches the first!

 

, so I ran again with Log=Keysend and got the following 2 logs

 

Two logs are NEVER produced. It is one log, "wideclient.log". The other one you keep posting is the previous one, just renamed so it doesn't get lost on those systems which folks have set up to auto-reload Wideclient on error.

 

Result was the same, it opens the program the first time I do it, but not the 2nd and after.  I have to close and re-open wideclient for it to work

 

 

Since it works here and we don't yet know why it isn't working on your system, there's no possible way for me to have made any difference yet, is there? Just logging doesn't change behaviour, it just gives us more information! When we get it right that is!

 

 

Wideclient ini:

[user]
Log=Errors+
Log=Keysend
KeySend3=RunKey1
RunKey1=c:\fast\fast\fastflightsim.exe
UseSendInput=Yes
 

 

 
Oh dear. You have TWO "Log" parameter lines. Only the first will be used. This is a normal Windows type CFG/INI file. Each parameter can only have ONE value!
 
Where's the Monitor line I asked you to add?
Pete
Link to comment
Share on other sites

OK, apologies, here is the log and the ini used to produce it:

 

********* WideClient Log [version 6.999n] Class=FS98MAIN *********
Date (dmy): 07/07/14, Time 09:47:14.445: Client name is CHARLES-4
Monitoring 330F,17
      250 KeyHook added: 259=0,0,,
      250 KeyHook added: 260=0,0,,
      250 LUA: "C:\Wideclient\Initial.LUA": not found
      265 Attempting to connect now
      281 Trying TCP/IP host "Newserver" port 8002 ...
      281 ... Okay, IP Address = 192.168.0.115
      281 Connection made okay!
      515 Using "C:\Wideclient\GFDEV.DLL", version 2.2.1.0
    31559 Monitored LAN data received:
              Offset 0330F:  
              01 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
              00                                                .
    31559 c:\fast\fast
    31559 c:\fast\fast\fastflightsim.exe
    31559 Checked KeySend[0]=3
    31856 New Client Application: "FASTFlightsim" (Id=3272)
    43056 Monitored LAN data received:
              Offset 0330F:  
              02 03 03 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
              00                                                .
    43056 Program 18, Window = 90222
    43056 Checked KeySend[1]=3
    45209 Monitored LAN data received:
              Offset 0330F:  
              03 03 03 03 00 00 00 00 00 00 00 00 00 00 00 00   ................
              00                                                .
    45209 Program 18, Window = 90222
    45209 Checked KeySend[2]=3
 
    60404 ****** End of session performance summary ******
    60404 Total time connected = 60 seconds
    60404 Reception maximum:  22 frames/sec, 668 bytes/sec
    60404 Reception average whilst connected:  14 frames/sec, 432 bytes/sec
    60404 Transmission maximum:  0 frames/sec, 177 bytes/sec
    60404 Transmission average whilst connected:  0 frames/sec, 25 bytes/sec
    60404 Max receive buffer = 638, Max send depth = 1, Send frames lost = 0
 
    60404 **************** Individual client application activity ****************
    60404 Client 3272 requests: 15 (Ave 0/sec), Data: 322 bytes (5/sec), Average 21 bytes/Process
 
    60404 ********* Log file closed (Buffers: MaxUsed 2, Alloc 931 Freed 931 Refused 0) *********
 
 
 
 
any my ini:
 
[user]
Log=Keysend
Monitor=330F,17
KeySend3=RunKey1
RunKey1=c:\fast\fast\fastflightsim.exe
UseSendInput=Yes
Link to comment
Share on other sites

OK, apologies, here is the log and the ini used to produce it:

 

 

Okay, this shows the problem clearly:

 

This is the first time:

    31559 Monitored LAN data received:
              Offset 0330F:  
              01 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
              00                                                .
    31559 c:\fast\fast
    31559 c:\fast\fast\fastflightsim.exe
    31559 Checked KeySend[0]=3
    31856 New Client Application: "FASTFlightsim" (Id=3272)

The program you are loading appears to be a client application. Here is where you tried (twice) to start it again:

    43056 Monitored LAN data received:
              Offset 0330F:  
              02 03 03 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
              00                                                .
    43056 Program 18, Window = 90222
    43056 Checked KeySend[1]=3

  and

    45209 Monitored LAN data received:
              Offset 0330F:  
              03 03 03 03 00 00 00 00 00 00 00 00 00 00 00 00   ................
              00                                                .
    45209 Program 18, Window = 90222
    45209 Checked KeySend[2]=3

In both instances the program is actually still running. Its Window handle is as logged, 90222.

 

I think you are not actually succeeding in properly terminating that program. Maybe the Window disappears, but it looks like it has a thread still running, probably waiting for something from FS. Check for yourself using the Windows Task Manager (Process list). If you delete it there your next retry will work.

 

The reason it works okay after you close and reload WideClient is probably because the program sees the client disappearing and no longer waits for data.

 

You could try closing the program using WideClient's CloseKey facility, but even that may not work -- it relaly depends how that program is written. It looks like it isn't processing close messages in its FSUIPC data thread.

 

Pete

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.