Nine Posted March 31, 2023 Author Posted March 31, 2023 Not doing it. But nothing stops you to modify it as you want... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
VAN0 Posted February 11, 2024 Posted February 11, 2024 Is the "data" property lost on client side when sent by server via _WCD_Send()? I can't seem to find it on client side...
Solution Nine Posted February 11, 2024 Author Solution Posted February 11, 2024 (edited) Data property should be in @extended (as a numeric value). ; From the example script ; Modified WaitForResponse to return @extended ... $sString = WaitForResponse () ConsoleWrite (@extended & "/" & $sString & @CRLF) Func WaitForResponse () Local $sResp While _WCD_IsServerAvailable () $sResp = _WCD_Client_GetResponse () If @extended Or $sResp Then Return SetExtended(@extended, $sResp) Sleep (100) WEnd EndFunc Edited February 11, 2024 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
VAN0 Posted February 11, 2024 Posted February 11, 2024 (edited) I'm using this on server side: _WCD_SEND($hServer, $hClient, 123, "foo") and on client side $sResp returns "foo", but @extended always returns 0 NVM, I had another function call before I checked the @extended macro...my bad. Edited February 11, 2024 by VAN0
WildByDesign Posted 14 hours ago Posted 14 hours ago The latest version of AutoIt requires adding another include to the UDF: #include <WindowsNotifsConstants.au3> I am wondering if you could help me with retrieving to strings on the server side, please. My example script below doesn't work, however, I am hoping that it will give you an idea of what I am trying to do. Server: #include <Constants.au3> #include <GUIConstants.au3> #include "WCD_IPC.au3" Opt ("MustDeclareVars", 1) Local $hServer = _WCD_CreateServer() Local $aReq, $iData While True If _WCD_Server_IsRequestAvail() Then $aReq = _WCD_Server_GetRequest() $iData = @extended Switch $iData Case 1 If $sString = "enable" Then ; run another function to enable If $sString = "disable" Then ; run another function to disable Case 2 If $sString = "enable" Then ; run another function to enable If $sString = "disable" Then ; run another function to disable EndSwitch EndIf Sleep (1000) WEnd Client: #include <Constants.au3> #include <GUIConstants.au3> #include "WCD_IPC.au3" Opt ("MustDeclareVars", 1) Global $hWnd = _WCD_CreateClient("Test WCD Client") Global $hWndServer = _WCD_GetServerHandle() _WCD_Send($hWnd, $hWndServer, 1, "enable") _WCD_Send($hWnd, $hWndServer, 1, "disable") _WCD_Send($hWnd, $hWndServer, 2, "enable") _WCD_Send($hWnd, $hWndServer, 2, "disable") The problem is that I have no idea how to obtain the string that is sent to the server. I can see the strings get sent in the log. Thank you.
Nine Posted 9 hours ago Author Posted 9 hours ago 4 hours ago, WildByDesign said: The latest version of AutoIt requires adding another include to the UDF Thank you. Yes last AutoIt version messed up with the #include. Many of my scripts are breaking because of it. I'll update this one tomorrow. Anyway, the string is located in $aReq[1], as described in example. WildByDesign 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
WildByDesign Posted 1 hour ago Posted 1 hour ago (edited) On 4/30/2020 at 6:02 PM, Nine said: _WCD_Send($hWnd, $hWndServer, 2, "5") ; adding text to a more complex request $sString = WaitForResponse () ConsoleWrite ($sString & @CRLF) It seems that the script crashes 100% of the time on this part here. Actually it seems that any attempt to send a string through it crashes the server script. Sending the initial numbers through without the string part works perfectly. I spent a few hours on this last night and again this morning. I've narrowed the problem down to this part of the example script. EDIT: Following the log file, it appears that there is never a response from the server for the times when the client sends a string. Even with the given example. Edited 57 minutes ago by WildByDesign
Nine Posted 44 minutes ago Author Posted 44 minutes ago It works well on my side. My example does not crash and returns expected value to the client. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
WildByDesign Posted 35 minutes ago Posted 35 minutes ago (edited) It looks like what is happening is that the string part never gets sent until the user clicks on the tray icon. So the first _WCD_Send($hWnd, $hWndServer, 1) gets sent and received. Then nothing happens. I can let it sit for 5 minutes. Then click on the tray icon, and that is when the _WCD_Send($hWnd, $hWndServer, 2, "5") gets sent but never received. By the way, this is on Windows 11 25H2 which is essentially the same kernel and everything as 24H2. EDIT: Actually its not specific to the strings. It seems to be any subsequent request. Any second request never goes through until the tray icon is clicked, no matter how long. Edited 30 minutes ago by WildByDesign
Nine Posted 22 minutes ago Author Posted 22 minutes ago I tested my example both on Win10 22h2 (au3 3.3.16.0) and Win11 25h2 (au3 3.3.18.0). All works well. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
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