MCrevot Posted October 25, 2021 Report Posted October 25, 2021 Hello, I'm trying to send characters to the Notepad application located on a "MC4-PC" client from a "MC0-PC" server using FSUIPC5 "KeySend" on MC0-PC (W10 64 pro) and WideFS7 on MC4-PC (W10 64 pro). The WideFS / FSUIPC connection is established correctly, NotePad opens correctly on MC4-PC but the reception on MC4-PC of KeySends causes "Can't SetWindowsHookEx! [X5] (Action request 1)" errors - Here is an extract from FSUIPC.ini: [Buttons] PollInterval=25 ButtonRepeat=20,10 1=P64,0,C1006,0 -{KEYSEND 0 for WideFS}- 2=P64,1,C1006,1 -{KEYSEND 1 for WideFS}- 3=P64,2,C1006,2 -{KEYSEND 2 for WideFS}- 4=P64,3,C1006,3 -{KEYSEND 3 for WideFS}- 5=P64,4,C1006,4 -{KEYSEND 4 for WideFS}- 6=P64,5,C1006,5 -{KEYSEND 5 for WideFS}- 7=P64,6,C1006,6 -{KEYSEND 6 for WideFS}- 8=P64,7,C1006,7 -{KEYSEND 7 for WideFS}- 9=P64,8,C1006,8 -{KEYSEND 8 for WideFS}- 10=P64,9,C1006,9 -{KEYSEND 9 for WideFS}- 11=P64,10,C1006,10 -{KEYSEND 10 for WideFS}- [ClientNames] 1=MC4-PC 2=MC1-PC -Here is un extract from WideClient.ini [User] Log=Errors+ Log=KeySend Run1 = C:\Windows\System32\notepad.exe KeySend0=65,8,Run1 KeySend1=66,8,Run1 KeySend2=67,8,Run1 KeySend3=52,8,Run1 KeySend4=53,8,Run1 KeySend5=57,8,Run1 KeySend6=48,8,Run1 KeySend7=55,8,Run1 KeySend8=56,8,Run1 KeySend9=54,8,Run1 KeySend10=191,8,Run1 - Here is WideClient.log ********* WideClient Log [version 7.159] Class=FS98MAIN ********* Date (dmy): 24/10/21, Time 16:55:23.631: Client name is MC4-PC 484 c:\windows\system32 484 C:\Windows\System32\notepad.exe 516 LUA: "C:\Users\MC4\Documents\Simu\WIDEFS\Initial.LUA": not found 547 Attempting to connect now 547 Trying to locate server: Need details from Server Broadcast 547 Failed to connect: waiting to try again 1578 Attempting to connect now 2625 Server = MC0-PC 2625 Trying TCP/IP host "MC0-PC" port 8002 ... 2625 ... Okay, IP Address = 192.168.1.20 2641 Connection made okay! 2891 Connection closed by server! 2906 Attempting to connect now 4906 Server = MC0-PC 4906 Trying TCP/IP host "MC0-PC" port 8002 ... 4906 ... Okay, IP Address = 192.168.1.20 4906 Connection made okay! 4969 Connection closed by server! 4984 Attempting to connect now 6984 Server = MC0-PC 6984 Trying TCP/IP host "MC0-PC" port 8002 ... 6984 ... Okay, IP Address = 192.168.1.20 6984 Connection made okay! 15281 Can't SetWindowsHookEx! [x5](Action request 1) 16750 Can't SetWindowsHookEx! [x5](Action request 2) 18281 Can't SetWindowsHookEx! [x5](Action request 3) 20781 Can't SetWindowsHookEx! [x5](Action request 4) I sent a KeySend0, a KeySend1, a KeySend2, a KeySend3 and a KeySend4: the KeySend0 does not cause any reaction on Notepad, the following Keysend causes the error. I tried with another client, "MC1-PC", the result is the same; How to solve this problem ? Michel ps : my sim : https://www.mya320sim.com/
Pete Dowson Posted October 25, 2021 Report Posted October 25, 2021 1 hour ago, MCrevot said: The WideFS / FSUIPC connection is established correctly, NotePad opens correctly on MC4-PC but the reception on MC4-PC of KeySends causes "Can't SetWindowsHookEx! [X5] (Action request 1)" errors Error 5 is "Access Denied". Possible reasons are different privilege levels (i.e. one being "run as administrator" but the other not), or, more likely, you are running a 64-bit version of Notepad which can't be hooked by a 32-bit program. Try using a different method, like setting "PostKeys=Yes" or "UseSendInput=Yes" (see about page 17 in the WideFS Technical guide). Pete
ckovoor Posted October 25, 2021 Report Posted October 25, 2021 Dear Pete and Michel, I had a similar problem on Win 10, though with FSX and FSUIPC4-WideFS7, some time ago, and the problem and its resolution are found in this thread: https://forum.simflight.com/topic/85961-wideclient-not-transmitting-keystrokes-to-local-fsx-on-networked-client-running-on-windows-10/ Just in case this helps. Regards, Chakko.
MCrevot Posted October 25, 2021 Author Report Posted October 25, 2021 Thanks Pete and Chakko. @Pete, "SendKeys = Yes": no more error message, but no SendKey reception "UseSendInput = Yes": does not change anything, always error messages I replaced the Notepad application with Notepad ++, 32bits application, it doesn't change anything. Did you notice that sending the first KeySend0 does not cause an error message, it is only from the second KeySend (KeySend1, KeySend2, KeySend3 and KeySend4) that there are errors ? ********* WideClient Log [version 7.159] Class=FS98MAIN ********* Date (dmy): 25/10/21, Time 15:05:03.394: Client name is MC4-PC 531 c:\program files (x86)\notepad++ 531 C:\Program Files (x86)\Notepad++\notepad++.exe 562 LUA: "C:\Users\MC4\Documents\Simu\WIDEFS\Initial.LUA": not found 609 Attempting to connect now 609 Trying to locate server: Need details from Server Broadcast 609 Failed to connect: waiting to try again 1641 Attempting to connect now 2687 Server = MC0-PC 2703 Trying TCP/IP host "MC0-PC" port 8002 ... 2719 ... Okay, IP Address = 192.168.1.20 2719 Connection made okay! 2937 Connection closed by server! 2937 Attempting to connect now 5000 Server = MC0-PC 5000 Trying TCP/IP host "MC0-PC" port 8002 ... 5000 ... Okay, IP Address = 192.168.1.20 5000 Connection made okay! 13953 Can't SetWindowsHookEx! [x5](Action request 1) 14781 Can't SetWindowsHookEx! [x5](Action request 2) 15891 Can't SetWindowsHookEx! [x5](Action request 3) 16875 Can't SetWindowsHookEx! [x5](Action request 4) @Chakko, I'm reading your post, but so far I can't find a solution ; I continue. Michel
Pete Dowson Posted October 25, 2021 Report Posted October 25, 2021 18 minutes ago, MCrevot said: "SendKeys = Yes": no more error message, but no SendKey reception Why try that? It’s for sending your key presses on the client to the server! Postkeys=Yes is what I suggested, and was also the solution for Chakko if you get to the end of that thread. Pete
MCrevot Posted October 25, 2021 Author Report Posted October 25, 2021 Sorry, Pete, it's "PostKeys = Yes" that I wanted to write. And I confirm, no more error message, but no reception from SenKey. Michel ***** WideClient.ini [User] Log=Errors+ Log=KeySend PostKeys=Yes Run1 = C:\Program Files (x86)\Notepad++\notepad++.exe KeySend0=65,8,Run1 KeySend1=66,8,Run1 KeySend2=67,8,Run1 KeySend3=52,8,Run1 KeySend4=53,8,Run1 KeySend5=57,8,Run1 KeySend6=48,8,Run1 KeySend7=55,8,Run1 KeySend8=56,8,Run1 KeySend9=54,8,Run1 KeySend10=191,8,Run1 ********* WideClient Log [version 7.159] Class=FS98MAIN ********* Date (dmy): 25/10/21, Time 15:52:50.289: Client name is MC4-PC 1141 c:\program files (x86)\notepad++ 1141 C:\Program Files (x86)\Notepad++\notepad++.exe 1187 LUA: "C:\Users\MC4\Documents\Simu\WIDEFS\Initial.LUA": not found 1234 Attempting to connect now 1234 Trying to locate server: Need details from Server Broadcast 1234 Failed to connect: waiting to try again 2250 Attempting to connect now 3297 Server = MC0-PC 3312 Trying TCP/IP host "MC0-PC" port 8002 ... 3328 ... Okay, IP Address = 192.168.1.20 3328 Connection made okay! 46141 Received shutdown offset code = ADBC 46141 FS closing down (param=ADBC), disconnecting 46141 ********* Interim performance summary ********* 46141 Total time connected so far = 43 seconds 46141 Reception maximum so far: 16 frames/sec, 949 bytes/sec 46141 Reception average whilst connected so far: 9 frames/sec, 455 bytes/sec 46141 Transmission maximum so far: 0 frames/sec, 200 bytes/sec 46141 Transmission average whilst connected so far: 0 frames/sec, 27 bytes/sec 46141 Max receive buffer = 593, Max send depth = 1, Send frames lost = 0 46141 *********************************************** 46234 Received shutdown offset code = ADBC 53797 Connection closed by server! 53797 Attempting to connect now 53797 Server = MC0-PC 53797 Trying TCP/IP host "MC0-PC" port 8002 ... 53797 ... Okay, IP Address = 192.168.1.20 74844 Error on client pre-Connection Select() [Error=10060] Connection timed out 74844 Ready to try connection again 75891 Attempting to connect now 75891 Giving up server, looking for another! 75891 Server = MC0-PC 75891 Trying TCP/IP host "MC0-PC" port 8002 ... 75891 ... Okay, IP Address = 192.168.1.20 97984 Server = MC0-PC 97984 Trying TCP/IP host "MC0-PC" port 8002 ... 97984 ... Okay, IP Address = 192.168.1.20 120047 Giving up server, looking for another! 120047 Server = MC0-PC 120047 Trying TCP/IP host "MC0-PC" port 8002 ... 120047 ... Okay, IP Address = 192.168.1.20 142125 Server = MC0-PC 142125 Trying TCP/IP host "MC0-PC" port 8002 ... 142125 ... Okay, IP Address = 192.168.1.20 164156 Giving up server, looking for another! 164156 Server = MC0-PC 164156 Trying TCP/IP host "MC0-PC" port 8002 ... 164156 ... Okay, IP Address = 192.168.1.20 186187 Server = MC0-PC 186187 Trying TCP/IP host "MC0-PC" port 8002 ... 186187 ... Okay, IP Address = 192.168.1.20 186328 ****** End of session performance summary ****** 186328 Total time connected = 43 seconds 186328 Reception maximum: 16 frames/sec, 949 bytes/sec 186328 Reception average whilst connected: 9 frames/sec, 455 bytes/sec 186328 Transmission maximum: 0 frames/sec, 200 bytes/sec 186328 Transmission average whilst connected: 0 frames/sec, 27 bytes/sec 186328 Max receive buffer = 593, Max send depth = 1, Send frames lost = 0 186328 ********* Log file closed (Buffers: MaxUsed 2, Alloc 447 Freed 447 Refused 0) *********
Pete Dowson Posted October 25, 2021 Report Posted October 25, 2021 1 hour ago, MCrevot said: Sorry, Pete, it's "PostKeys = Yes" that I wanted to write. And I confirm, no more error message, but no reception from SenKey. What if Notepad has the keyboard focus? I'm afraid I don't know any other way to get keys into a program which needs the focus. Some programs using "hot keys" use a facility provided by Windows to be notified of a keystroke even without focus. I'll do some tests here tomorrow. I do use SendKeys quite a lot, and successfully, on an 8-way Network, but all the clients are Win7 based, only the Server is Win10. Pete
MCrevot Posted October 25, 2021 Author Report Posted October 25, 2021 Pete Notepad has focus (blinking cursor). I have disabled firewall and antivirus. What is especially bizarre is that the first keysend does not cause anything, neither sending a key nor an error message ??? maybe a clue ? Thank you very much for your time. Michel
Pete Dowson Posted October 26, 2021 Report Posted October 26, 2021 I've been trying to find out what the hook function does not work on Windows 10, with no success I'm afraid. I tested with PostKeys=Yes instead, and that works as far as WideClient is concerned. Here's a log with Log=Keys set in the INI: 1797 c:\windows\system32 1797 c:\Windows\System32\Notepad.exe 1828 Attempting to connect now 1828 Trying TCP/IP addr 127.0.0.1, port 8002 ... 1844 Connection made okay! 1844 LUA: "E:\WideClient\WideClientLocal\Initial.LUA": not found 13813 Post/Send input for KeyHook action 2 13813 WM_KEYDOWN posted to Window 000c1088 ok, VK code 67 13891 WM_KEYUP posted to Window 000c1088 ok, VK code 67 13953 Action request sent 2 events 27032 Post/Send input for KeyHook action 3 27032 WM_KEYDOWN posted to Window 000c1088 ok, VK code 52 27094 WM_KEYUP posted to Window 000c1088 ok, VK code 52 27157 Action request sent 2 events 213125 Post/Send input for KeyHook action 3 213125 WM_KEYDOWN posted to Window 000c1088 ok, VK code 52 213203 WM_KEYUP posted to Window 000c1088 ok, VK code 52 213266 Action request sent 2 events 215485 Post/Send input for KeyHook action 3 215485 WM_KEYDOWN posted to Window 000c1088 ok, VK code 52 215563 WM_KEYUP posted to Window 000c1088 ok, VK code 52 215625 Action request sent 2 events 218500 Post/Send input for KeyHook action 4 218500 WM_KEYDOWN posted to Window 000c1088 ok, VK code 53 218563 WM_KEYUP posted to Window 000c1088 ok, VK code 53 218625 Action request sent 2 events However, monitoring the NotePad window (which top level was definitely 000c1088) using SpyXX there was no sign of those Keyboard messages going to Notepad. Now I don't know if this is because of some Win10 protection, or just a peculiarity of NotePad. Are you actually wanting to enter text in Notepad via a WideFS link? Or was this just testing for another use. If so, could you try the PostKeys method with that? I'll continue to research this, but I'm running out of relevant sources of wisdom! 😞 BTW, of the three methods available, both the default (via the Hook) and 'UseSendInput' methods do need the target window to have focus -- unless it has been programmed to declare the keys you are sending as 'hot keys', in which it should get them no matter what the source. But the PostKeys method directs the keypress messages to the program identified in the KeySend parameter (the results of 'Run1' in your case), so shouldn't need it to have focus. So, I'm puzzled as to why this isn't working with NotePad. It may well be okay with other programs. Pete
MCrevot Posted October 26, 2021 Author Report Posted October 26, 2021 Hi Pete, and really thanks for your help ... Yes, I am using Notepad to check that key sending is working properly; the real goal is: 1) On MC1-PC, the server of my simulator, I connected a panel dedicated to RCV4 (Radar contact, for ATC), made up of several keys. 2) The keyboard is connected to SIOC, which activates the buttons of a virtual FSUIPC Joystick. 3) RCV4 is installed on MC4-PC; WideClient must receive the Joystick sends, and translate into characters for RCV4. I will test the Postkeys method. Michel
Pete Dowson Posted October 26, 2021 Report Posted October 26, 2021 17 minutes ago, MCrevot said: RCV4 is installed on MC4-PC; WideClient must receive the Joystick sends, and translate into characters for RCV4. I used RCV4 for many years, and on a Client PC, but always controlled it via the menus it displays through FSUIPC on the FS screen. RCV4 sets the possible selections using a HotKeys facility in FSUIPC. I never had to send any keypresses direct to RCV4, so why is your setup different? Surely you want the buttons on your special panel to send keystrokes to FS/FSUIPC in answer to the menus displayed? RCV4 detects them from FSUIPC. Pete
MCrevot Posted October 26, 2021 Author Report Posted October 26, 2021 Pete, I project 3 P3DV4 views on a circular screen, and I do not display any foreign windows on this screen; I therefore control RCV4 using a dedicated keyboard managed by SIOC (see the attched file), on the MC1-PC server; RCV4 is on a client, MC4-PC. Do you see another method to operate RCV4 from my panel, other than the one I described? Michel
Pete Dowson Posted October 26, 2021 Report Posted October 26, 2021 3 minutes ago, MCrevot said: I project 3 P3DV4 views on a circular screen, and I do not display any foreign windows on this screen Yes, me too at the time I used RCV4. Now I cut it down from 3 HD projectors to 2 UHD projectors, but the same 210 degree curved scren. All the messages which would otherwise be shown on that screen are trapped by the FSUIPC facility to divert them, and sent to a client for display there -- using event.textmenu (see the AllTexts.lua plug-in). So the RCV4 menu was displayed on a small screen in my cockpit instead of on the curved FS view. 7 minutes ago, MCrevot said: Do you see another method to operate RCV4 from my panel, other than the one I described? Any button. switch, or key can be programmed in FSUIPC to send the keypress to FSUIPC corresponding to the desired answer to RCV4's menus. I was never actually aware that RCV4 accepted menu choices directly on its local keyboard! Pete
MCrevot Posted October 26, 2021 Author Report Posted October 26, 2021 I would love to be able to use UHD projectors, but I need a low throw-ratio (max 0.5) ... (the projectors are on the roof of the shell) For RCV4: in a previous configuration, with RCV4 on the server, SIOC managed the keyboard, then operated the buttons of a virtual FSUIPC joystick which sent the keys directly to RCV4, displaying RCV4 on a separate screen, it worked very well ! But now, RCV4 is on a client ... I just tried the Postkeys method, nothing happens, no more messages in the log ! ********* WideClient Log [version 7.159] Class=FS98MAIN ********* Date (dmy): 26/10/21, Time 16:18:38.699: Client name is MC4-PC 469 c:\program files (x86)\notepad++ 469 C:\Program Files (x86)\Notepad++\notepad++.exe 500 LUA: "C:\Users\MC4\Documents\Simu\WIDEFS\Initial.LUA": not found 532 Attempting to connect now 532 Trying to locate server: Need details from Server Broadcast 532 Failed to connect: waiting to try again 1547 Attempting to connect now 2547 Server = MC0-PC 2563 Trying TCP/IP host "MC0-PC" port 8002 ... 2579 ... Okay, IP Address = 192.168.1.20 2594 Connection made okay! 51969 ****** End of session performance summary ****** 51969 Total time connected = 49 seconds 51969 Reception maximum: 15 frames/sec, 917 bytes/sec 51969 Reception average whilst connected: 14 frames/sec, 700 bytes/sec 51969 Transmission maximum: 0 frames/sec, 178 bytes/sec 51969 Transmission average whilst connected: 0 frames/sec, 26 bytes/sec 51969 Max receive buffer = 589, Max send depth = 1, Send frames lost = 0 51969 ********* Log file closed (Buffers: MaxUsed 2, Alloc 755 Freed 755 Refused 0) ********* If I delete "PostKeys = Yes", I get the "Can't SetWindowsHookEx ..." messages again, but just from the second key press, nothing for the first! I am a little lost ! Michel
Pete Dowson Posted October 26, 2021 Report Posted October 26, 2021 4 minutes ago, MCrevot said: I just tried the Postkeys method, nothing happens, no more messages in the log ! You'd need Log=Keys set, as I said. But as I said, I can't get Notepad to receive anything. Weren't you going to try it with RCV4 instead? Anyway, quite honestly I don't know why you just don't make use of RCV4's built-in menu facilities and its choice reading from FSUIPC. As I used to do (changed to Pilot2ATC a few years ago). How does RCV4 present you with the choices and get the responses? It was always through FSUIPC, not direct, when I used it! Pete
MCrevot Posted October 26, 2021 Author Report Posted October 26, 2021 Pete, I have the option "Log = keys" in the .ini! but indeed, nothing is displayed ... which is not normal ?? WideClient version 7.1.5.9 ; PLEASE SEE WideFS documentation for parameter details ; ===================================================== [Config] Port=8002 Window=22,28,395,147 Visible=Yes ButtonScanInterval=20 ClassInstance=0 NetworkTiming=5,1 MailslotTiming=1000,1000 PollInterval=2000 Port2=9002 ReconnectMinutes=0 ResponseTime=18 ApplicationDelay=0 TCPcoalesce=No WaitForNewData=500 MaxSendQ=100 OnMaxSendQ=Log NewSendScanTime=50 Priority=3,1,2 ; ----------------------------------------------- [User] Log=Errors+ Log=KeySend Log=Keys PostKeys=Yes Run1 = C:\Program Files (x86)\Notepad++\notepad++.exe KeySend0=65,8,Notepad++ KeySend1=66,8,Notepad++ KeySend2=67,8,Run1 KeySend3=52,8,Run1 KeySend4=53,8,Run1 KeySend5=57,8,Run1 KeySend6=48,8,Run1 KeySend7=55,8,Run1 KeySend8=56,8,Run1 KeySend9=54,8,Run1 KeySend10=191,8,Run1 ; =============================================== [Sounds] Path=C:\Users\MC4\Documents\Simu\WIDEFS\Sound\ Device1=Périphérique audio principal Device2=Haut-parleurs (Realtek(R) Audio) Regarding RCv4, I had never paid attention to the fact that FSUIPC was the keyboard interface !!! I therefore used FSUIPC to translate the SIOC keys ... From now on, I always have to go through SIOC, because my keyboard is not a joystick. If I understand correctly, you suggest me to try directly with RCV4 instead of Notepad ++ ??? Michel
Pete Dowson Posted October 26, 2021 Report Posted October 26, 2021 16 minutes ago, MCrevot said: Log=Errors+ Log=KeySend Log=Keys I'm not sure which of your three alternative values for Logs Windows provides the program. you can only use one instance of each keyword. 18 minutes ago, MCrevot said: Regarding RCv4, I had never paid attention to the fact that FSUIPC was the keyboard interface !!! I therefore used FSUIPC to translate the SIOC keys ... From now on, I always have to go through SIOC, because my keyboard is not a joystick. Are you saying SIOC cannot send keypresses? Can the keyboard itself not send keypresses? Pete
MCrevot Posted October 26, 2021 Author Report Posted October 26, 2021 Ah, there is progress, it only takes a log option ***** WideClient.ini Log=Keys PostKeys=Yes Run1 = C:\Program Files (x86)\Notepad++\notepad++.exe KeySend0=65,8,Run1 KeySend1=66,8,Run1 KeySend2=67,8,Run1 KeySend3=52,8,Run1 KeySend4=53,8,Run1 KeySend5=57,8,Run1 KeySend6=48,8,Run1 KeySend7=55,8,Run1 KeySend8=56,8,Run1 KeySend9=54,8,Run1 KeySend10=191,8,Run1 ********* WideClient Log [version 7.159] Class=FS98MAIN ********* Date (dmy): 26/10/21, Time 18:03:36.895: Client name is MC4-PC 500 c:\program files (x86)\notepad++ 500 C:\Program Files (x86)\Notepad++\notepad++.exe 531 LUA: "C:\Users\MC4\Documents\Simu\WIDEFS\Initial.LUA": not found 531 Attempting to connect now 531 Trying to locate server: Need details from Server Broadcast 531 Failed to connect: waiting to try again 1578 Attempting to connect now 2578 Server = MC0-PC 2593 Trying TCP/IP host "MC0-PC" port 8002 ... 2609 ... Okay, IP Address = 192.168.1.20 2625 Connection made okay! 2781 Connection closed by server! 2781 Attempting to connect now 4781 Server = MC0-PC 4781 Trying TCP/IP host "MC0-PC" port 8002 ... 4781 ... Okay, IP Address = 192.168.1.20 4796 Connection made okay! 9937 Post/Send input for KeyHook action 1 9937 WM_KEYDOWN posted to Window 000504a6 ok, VK code 66 10015 WM_KEYUP posted to Window 000504a6 ok, VK code 66 10078 Action request sent 2 events 11625 Post/Send input for KeyHook action 2 11625 WM_KEYDOWN posted to Window 000504a6 ok, VK code 67 11703 WM_KEYUP posted to Window 000504a6 ok, VK code 67 11765 Action request sent 2 events 13453 Post/Send input for KeyHook action 3 13453 WM_KEYDOWN posted to Window 000504a6 ok, VK code 52 13546 WM_KEYUP posted to Window 000504a6 ok, VK code 52 13609 Action request sent 2 events 15156 Post/Send input for KeyHook action 4 15156 WM_KEYDOWN posted to Window 000504a6 ok, VK code 53 15234 WM_KEYUP posted to Window 000504a6 ok, VK code 53 15296 Action request sent 2 events 17046 Post/Send input for KeyHook action 5 17046 WM_KEYDOWN posted to Window 000504a6 ok, VK code 57 17125 WM_KEYUP posted to Window 000504a6 ok, VK code 57 17187 Action request sent 2 events 23515 ****** End of session performance summary ****** 23531 Total time connected = 18 seconds 23531 Reception maximum: 14 frames/sec, 681 bytes/sec 23531 Reception average whilst connected: 13 frames/sec, 666 bytes/sec 23531 Transmission maximum: 0 frames/sec, 19 bytes/sec 23531 Transmission average whilst connected: 0 frames/sec, 40 bytes/sec 23531 Max receive buffer = 589, Max send depth = 1, Send frames lost = 0 For SIOC: indeed, SIOC can send keys, but the choice of the active window is bugged! And no, my ATC keyboard cannot send keys, they are simple push buttons ... i need SIOC Tomorrow I think I will try to replace Notepad with RCV4 ... Michel
MCrevot Posted October 28, 2021 Author Report Posted October 28, 2021 Hello Pete, it took me a little while, because I encountered some unexpected difficulties while installing RCV4 on my test client (problem registering dll msstdfmt). I tried the method you are using, and the method via WideClient (without and with PostKeys). 1) Simple method via FSUIPC - On the server: keyboard keys -> SIOC -> FSUIPC virtual joystick -> send RCV4 keys - On the client: WideClient and RCV4 RCV4 is working (displaying the RCV4 window on P3D on the server) and is receiving something, but I have an error "Runtime error 75, RadarContact.fsuipc.rcv4code" 2a) Method via WideClient - On the Server: keyboard keys -> SIOC -> FSUIPC virtual joystick -> send Keysend - On the client, WideClient and RCV4 No reaction from RCV4 during Keysend, and still the error "Can't SetWindowsHookEx ..." ********* WideClient.ini Log=KeysSend KeySend0=65,8 KeySend1=66,8 KeySend2=67,8 KeySend3=52,8 KeySend4=53,8 KeySend5=57,8 KeySend6=48,8 KeySend7=55,8 KeySend8=56,8 KeySend9=54,8 KeySend10=191,8 ********* WideClient Log [version 7.159] Class=FS98MAIN ********* Date (dmy): 28/10/21, Time 15:31:52.077: Client name is MC4-PC 328 LUA: "C:\Users\MC4\Documents\Simu\WIDEFS\Initial.LUA": not found 375 Attempting to connect now 375 Trying to locate server: Need details from Server Broadcast 375 Failed to connect: waiting to try again 1375 Attempting to connect now 2391 Server = MC0-PC 2406 Trying TCP/IP host "MC0-PC" port 8002 ... 2406 ... Okay, IP Address = 192.168.1.20 2406 Connection made okay! 19922 New Client Application: "rcv4" (Id=2008) 38141 Setting hook for KeyHook action 1 38141 Can't SetWindowsHookEx! [x5](Action request 1) 2b) Method via WideClient, using PostKeys=Yes No more RVC4 reaction ********* WideClient.ini Log=Keys PostKeys=Yes KeySend0=65,8 KeySend1=66,8 KeySend2=67,8 KeySend3=52,8 KeySend4=53,8 KeySend5=57,8 KeySend6=48,8 KeySend7=55,8 KeySend8=56,8 KeySend9=54,8 KeySend10=191,8 ********* WideClient Log [version 7.159] Class=FS98MAIN ********* Date (dmy): 28/10/21, Time 15:54:36.695: Client name is MC4-PC 360 LUA: "C:\Users\MC4\Documents\Simu\WIDEFS\Initial.LUA": not found 422 Attempting to connect now 422 Trying to locate server: Need details from Server Broadcast 422 Failed to connect: waiting to try again 1422 Attempting to connect now 16563 Server = MC0-PC 16579 Trying TCP/IP host "MC0-PC" port 8002 ... 16579 ... Okay, IP Address = 192.168.1.20 16579 Connection made okay! 34422 New Client Application: "rcv4" (Id=2468) 51969 Post/Send input for KeyHook action 1 51969 WM_KEYDOWN posted to Window 0017093e ok, VK code 66 52047 WM_KEYUP posted to Window 0017093e ok, VK code 66 52110 Action request sent 2 events nb : runing RCV4 on the server, all is OK. Michel
Pete Dowson Posted October 28, 2021 Report Posted October 28, 2021 7 hours ago, MCrevot said: 1) Simple method via FSUIPC - On the server: keyboard keys -> SIOC -> FSUIPC virtual joystick -> send RCV4 keys - On the client: WideClient and RCV4 RCV4 is working (displaying the RCV4 window on P3D on the server) and is receiving something, but I have an error "Runtime error 75, RadarContact.fsuipc.rcv4code" Sorry, I've no idea what RCV4 is saying with that error. But then I've no idea what you've programmed in your "send RCV4 keys". Perhaps you should elaborate. Anyway, test in the first place by actually pressing the correct keys on the Server's keyboard. Then you'll know. The method of answering the menu on the FS PC has always worked for all of the RC users I've known. I think for further help you might need to ask other user's advice -- I'm sure there's still an AVSIM forum for RC. Pete
MCrevot Posted October 29, 2021 Author Report Posted October 29, 2021 Hello Pete, a last test, because I am not sure that RCV4 is involved; I forget my ATC and SIOC panel, basic configuration: 1) FSUIPC5 (P3DV4.5) and RCV4 on the MC1-PC server; I type 1 on the keyboard (which is the key expected by RCV4 for option 1 of the first wait for RCV4), RCV4 responds correctly. 2) FSUIPC5 (P3DV4.5) on the MC1-PC server, WideClient7 and RCV4 on the MC4-PC client; I run WideClient, then RCV4, I load the flight plan and start RCV4; on P3D, RCV4 is displayed, OK; I type 1 on the keyboard of MC1-PC, and I get on MC4-PC the error "Runtime error 75, RadarContact.fsuipc.rcv4code", and RCV4 stops. I will go to the RCV4 forum to try to know the meaning of this error, but I guess RCV4 does not receive, in the second test, the same as in the first? Michel
Pete Dowson Posted October 30, 2021 Report Posted October 30, 2021 21 hours ago, MCrevot said: I get on MC4-PC the error "Runtime error 75, RadarContact.fsuipc.rcv4code", and RCV4 stops. I will go to the RCV4 forum to try to know the meaning of this error, but I guess RCV4 does not receive, in the second test, the same as in the first? Nothing is "sent" to an FSUIPC application, it is the application reading data from a memory location in FSUIPC (copied to WideClient in this case). The data should be identical. If you can find out what that error means, it would certainly help. I also still need to know exactly what your ATC panel is sending, and to what program. Is it writing to offsets or sending keystrokes or controls? Pete
MCrevot Posted October 30, 2021 Author Report Posted October 30, 2021 Hello Pete, I answer in order: 1) OK for the way WideClient and FSUIPC communicate. 2) The "Runtime error 75" error: I got the explanation and the fix: it is an unrecognized path problem, I simply had to confirm in RDV4 the path to access to the flight plan, and everything is back in order: I can, via WideClient, operate RCV4 on the client from the server keyboard without going through KEYSENDs, and I can also do it from my ATC panel via SIOC: for this I use the buttons of virtual joystick n ° 64. ********** Extract FSUIPC.ini // <Entry number> = <Action><Joy#>,<Btn#>,K<key>,<shifts> 1=P64,0,K49,8 -1 pour RCV4 2=P64,1,K50,8 -2 pour RCV4 3=P64,2,K51,8 -3 pour RCV4 4=P64,3,K52,8 -4 pour RCV4 5=P64,4,K53,8 -5 pour RCV4 6=P64,5,K57,8 -9 pour RCV4 7=P64,6,K48,8 -0 pour RCV4 8=P64,7,K55,8 -7 pour RCV4 9=P64,8,K56,8 -8 pour RCV4 10=P64,9,K54,8 -6 pour RCV4 11=P64,10,K191,11 -Ctl+Shift+/ pour RCV4 ; vérifier 191 (959 ?) From there I have a first solution that works, but 3) I want to activate RCV4 (or another application) on the client using the FSUIPC KEYSENDs, in order, on the client, to be able to choose the destination application (because on the client, I have RCV4, but also LittleNevMap , etc ...). The KEYSENDs of FSUIPC are: ********** Extract FSUIPC.ini [Buttons] PollInterval=25 ButtonRepeat=20,10 1=P64,0,C1006,0 -{KEYSEND 0 for WideFS}- 2=P64,1,C1006,1 -{KEYSEND 1 for WideFS}- 3=P64,2,C1006,2 -{KEYSEND 2 for WideFS}- 4=P64,3,C1006,3 -{KEYSEND 3 for WideFS}- 5=P64,4,C1006,4 -{KEYSEND 4 for WideFS}- 6=P64,5,C1006,5 -{KEYSEND 5 for WideFS}- 7=P64,6,C1006,6 -{KEYSEND 6 for WideFS}- 8=P64,7,C1006,7 -{KEYSEND 7 for WideFS}- 9=P64,8,C1006,8 -{KEYSEND 8 for WideFS}- 10=P64,9,C1006,9 -{KEYSEND 9 for WideFS}- 11=P64,10,C1006,10 -{KEYSEND 10 for WideFS}- The buttons of joystick 64 are operated by my ATC panel thanks to SIOC: ********** SIOC extract // Initialisation Var 0 { &TEMOIN_LED = 0 } // Déclaration du joystick virtuel Var 5000, name AA_JOYSTICK_64, Link FSUIPC_OUT, Offset $3340, Length 4 // pour actionner un bouton du joystick 64 // Enumération des boutons du panel Var 5001, name SW0, Link IOCARD_SW, Input 0, Type I { &AA_JOYSTICK_64 = CHANGEBIT 0, &SW0 CALL &TEMOIN } Var 5002, name SW1, Link IOCARD_SW, Input 1, Type I { &AA_JOYSTICK_64 = CHANGEBIT 1, &SW1 CALL &TEMOIN } Var 5003, name SW2, Link IOCARD_SW, Input 2, Type I { &AA_JOYSTICK_64 = CHANGEBIT 2, &SW2 CALL &TEMOIN } Var 5004, name SW3, Link IOCARD_SW, Input 3, Type I { &AA_JOYSTICK_64 = CHANGEBIT 3, &SW3 CALL &TEMOIN } Var 5005, name SW4, Link IOCARD_SW, Input 4, Type I { &AA_JOYSTICK_64 = CHANGEBIT 4, &SW4 CALL &TEMOIN } Var 5006, name SW5, Link IOCARD_SW, Input 5, Type I { &AA_JOYSTICK_64 = CHANGEBIT 5, &SW5 CALL &TEMOIN } Var 5007, name SW6, Link IOCARD_SW, Input 6, Type I { &AA_JOYSTICK_64 = CHANGEBIT 6, &SW6 CALL &TEMOIN } Var 5008, name SW7, Link IOCARD_SW, Input 7, Type I { &AA_JOYSTICK_64 = CHANGEBIT 7, &SW7 CALL &TEMOIN } Var 5009, name SW8, Link IOCARD_SW, Input 8, Type I { &AA_JOYSTICK_64 = CHANGEBIT 8, &SW8 CALL &TEMOIN } Var 5010, name SW9, Link IOCARD_SW, Input 9, Type I { &AA_JOYSTICK_64 = CHANGEBIT 9, &SW9 CALL &TEMOIN } Var 5011, name SW10, Link IOCARD_SW, Input 10, Type I { &AA_JOYSTICK_64 = CHANGEBIT 10, &SW10 CALL &TEMOIN } Var 5020, name TEMOIN_LED, Link IOCARD_OUT, Output 11 Var 5030, name TEMOIN, Link subrutine { &TEMOIN_LED = 1 &TEMOIN_LED = DELAY 0 100 } Michel
Pete Dowson Posted October 30, 2021 Report Posted October 30, 2021 3 hours ago, MCrevot said: 3) I want to activate RCV4 (or another application) on the client using the FSUIPC KEYSENDs, in order, on the client, to be able to choose the destination application (because on the client, I have RCV4, but also LittleNevMap , etc ...). I thought you'd sorted RCV4 using local sim PC responses. not via KeySends. What's your other (new) problem? I don't see it explained here. Pete
MCrevot Posted October 31, 2021 Author Report Posted October 31, 2021 Hello Pete, As I indicated to you, I try to send from my server W10 pro PC some characters to the attention of an application on a client W10 pro PC using the KEYSEND of FSUIPC, and WIDEFS: indeed, on my simu , all the hardware is connected to the server and is managed by SIOC, while I have several applications on one of the clients PC that I am trying to control from server panels. Among these applications, the most important is RCV4, and I can now fly RCV4 without going through KEYSEND. But I'm still looking for how to get these KEYSENDs to work, which I find very handy because it allows you to choose the target application - and I still can't ... Anyway, thank you very much for your help.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now