okay Posted January 29, 2020 Posted January 29, 2020 I have a client/server script that sends strings to a remote computer, then the remote computer simulate the string as keystrokes. So the client contains statement such as UDPSend($iSocket, "E") And the server just has While 1 Do ; We are waiting for the string "toto" OR "tata" (example script UDPSend): 4 bytes length. $sReceived = UDPRecv($iSocket, 4) Until $sReceived <> "" Send($sReceived) WEnd This works great for letters and numbers. Now I tried to emulate some special key press with UDPSend($iSocket, "{DOWN}{ENTER}") It is unfortunately not working on the remote (server) PC. What could the issue be ? I tried BinaryToString on the remote server in case the UDP received data is interpreted as binary but it does not fix the problem.
Nine Posted January 29, 2020 Posted January 29, 2020 Send the real char with the chr () function. Example to send {ENTER}, use chr(13) (it means send carriage return). Look appendix of help file for list of ASCII chars. “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
Nine Posted January 29, 2020 Posted January 29, 2020 Or you could use the chr between 1 and 31 and associate it with the send sequence you would like : Local $sReceived = "ABC" & chr(13) & "123" & chr (11) & "$%?" $aChars = StringSplit ($sReceived, "") For $i = 1 to $aChars[0] Switch Asc ($aChars[$i]) Case 13 Send ("{ENTER}") Case 11 Send ("{DOWN}") Case Else Send ($aChars[$i]) EndSwitch Next “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