MoriceGrene Posted Friday at 11:03 PM Posted Friday at 11:03 PM (edited) Hi, does anyone have a simple example of an asynchronous server that uses name pipes and a client, I've never used them and I don't know where to start from the manual, I can't come up with much except the definitions of what the functions do but I don't know where to start thanks to anyone who would like to help me Edited Friday at 11:04 PM by MoriceGrene
argumentum Posted Saturday at 12:26 AM Posted Saturday at 12:26 AM did you look at /topic/204734-overlapped-named-pipe-ipc ? MoriceGrene 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
MoriceGrene Posted Saturday at 10:01 AM Author Posted Saturday at 10:01 AM But isn’t there a simpler example? Whenever I try to simplify the code, it stops working and gives me formatting errors. Moreover, it opens a GUI window that I don’t understand where it’s coming from. All I really need is: A server listening in the background A client that, when needed, sends a string The server receives it I don’t want to use network protocols, and I’d like as little code as possible. Ideally, there would be something already pre-built—just call it, send the string, and have it received on the other side. It doesn’t even have to be AutoIt—any solution that can be easily integrated from AutoIt (e.g., via a DLL or a simple executable) would be perfect. Does anything like this even exist? my simplicode #include <Array.au3> #include "NPIPC Server UDF.au3" Opt("MustDeclareVars", 1) $NPIPC_VERBOSE = True ; this is default (set to false to hide console) _Example() Func _Example() Local $aPipe = _NPIPC_SetUpPipeDuplex ("\\.\pipe\PipeInOut") ; set pipe up Local $tEvents, $aEvent = _NPIPC_InitPipe($aPipe, $tEvents) ; init pipe _NPIPC_ConnectClient($aEvent) ; start and wait for client to connect Local $iEvent, $sRequest, $sResponse $iEvent = _NPIPC_WaitForEvent($aEvent, $tEvents) ; $sRequest = $aEvent[$iEvent][$etBuffer].text ConsoleWrite($sRequest) _NPIPC_DisconnectClient($aEvent) EndFunc expandcollapse popup#include <Array.au3> #include "NPIPC Server UDF.au3" Opt("MustDeclareVars", 1) $NPIPC_VERBOSE = True ; this is default (set to false to hide console) _Example() Func _Example() Local $aPipe = _NPIPC_SetUpPipeDuplex ("\\.\pipe\PipeInOut") ; set pipe up Local $tEvents, $aEvent = _NPIPC_InitPipe($aPipe, $tEvents) ; init pipe _NPIPC_ConnectClient($aEvent) ; start and wait for client to connect Local $iEvent, $sRequest, $sResponse $iEvent = _NPIPC_WaitForEvent($aEvent, $tEvents) ; $sRequest = $aEvent[$iEvent][$etBuffer].text ConsoleWrite($sRequest) _NPIPC_DisconnectClient($aEvent) EndFunc server #include <Array.au3> #include "NPIPC Server UDF.au3" Opt("MustDeclareVars", 1) $NPIPC_VERBOSE = True ; this is default (set to false to hide console) _Example() Func _Example() Local $aPipe = _NPIPC_SetUpPipeDuplex ("\\.\pipe\PipeInOut") ; set pipe up Local $tEvents, $aEvent = _NPIPC_InitPipe($aPipe, $tEvents) ; init pipe _NPIPC_ConnectClient($aEvent) ; start and wait for client to connect Local $iEvent, $sRequest, $sResponse While True Switch GUIGetMsg() ; only required if $NPIPC_VERBOSE = True Case $GUI_EVENT_CLOSE ; otherwise replace this by a Sleep (10) ExitLoop ; and setup a HotKeySet to exit loop EndSwitch $iEvent = _NPIPC_WaitForEvent($aEvent, $tEvents) If $iEvent < 0 Then ContinueLoop Switch $aEvent[$iEvent][$eState] Case 0 _NPIPC_CheckConnect($aEvent[$iEvent][$eState], $aEvent[$iEvent][$ehPipe], $aEvent[$iEvent][$etOverlap]) Case 1 _NPIPC_ReadRequest($aEvent[$iEvent][$eState], $aEvent[$iEvent][$ehPipe], $aEvent[$iEvent][$etOverlap], _ $aEvent[$iEvent][$etBuffer], $aEvent[$iEvent][$epBuffer]) Case 2 _NPIPC_CheckPending($aEvent[$iEvent][$eState], $aEvent[$iEvent][$ehPipe], $aEvent[$iEvent][$etOverlap]) Case 3 ; prepare response to client here $sRequest = $aEvent[$iEvent][$etBuffer].text _NPIPC_LogMsg("MsgLoop ...........: Request = " & $sRequest) $aEvent[$iEvent][$eState] = 4 If $sRequest = "short" Then $sResponse = "Short Response" Else $sResponse = "" For $i = 1 To 200 $sResponse &= "123456789012345abc " & $i & @CRLF Next EndIf If Not _WinAPI_SetEvent($aEvent[$iEvent][$etOverlap].hEvent) Then Exit MsgBox($MB_SYSTEMMODAL, "Msg Loop", "SetEvent failed 1") Case 4 _NPIPC_WriteOutput($sResponse, $aEvent[$iEvent][$eState], $aEvent[$iEvent][$ehPipe], $aEvent[$iEvent][$etOverlap]) Case 5 $aEvent[$iEvent][$eState] = 1 If Not _WinAPI_SetEvent($aEvent[$iEvent][$etOverlap].hEvent) Then Exit MsgBox($MB_SYSTEMMODAL, "Msg Loop", "SetEvent failed 2") Case 99 ExitLoop EndSwitch WEnd _NPIPC_DisconnectClient($aEvent) EndFunc
Nine Posted Saturday at 11:40 AM Posted Saturday at 11:40 AM @MoriceGrene The examples provided in the UDF can easily be converted to receiver only and sender only. I can give you a small example, but before I invest some time on it, could you please answer this question. Why do you need named pipe ? “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
MoriceGrene Posted Saturday at 03:18 PM Author Posted Saturday at 03:18 PM I would like to communicate two autoit applications that I have now to automate a copy process and now basically I go to the first app I right click on a button and it copies me the name of the button which is variable then I go to the second app and there I paste the name into an input box instead of doing this which is slow and tedious every time I would like to right click and send the text directly into the input box of the second app, I don't know if I have explained myself well
SOLVE-SMART Posted Saturday at 03:55 PM Posted Saturday at 03:55 PM Hi @MoriceGrene, what you describe can be handled by a simply file or INI file. Instead of copy/send your single string of the button, you simply write the string in a file and your other program watches the file for changes. If modified, read the string out of the file and your done. Of course, this is not very elegant or cannot be scaled very well, but for your described use case totally enough out of my perspective. Then a input box is also not necessary anymore. Read the string from file - no input box. ------ Another way could be the usage of the clipboard. Copy the button name string into the clipboard. Maybe with a identifier prefix for a better distinction between what is actually the button name versus other content in the clipboard. Then watch the clipboard content ... basically the some way like described above. ------ More mature ways would be Pipes, yes. Or other Client-Server variants. Best regards Sven ==> AutoIt related: 🔗 GitHub, 🔗 Discord Server, 🔗 Cheat Sheet, 🔗 autoit-webdriver-boilerplate Spoiler 🌍 Au3Forums 🎲 AutoIt (en) Cheat Sheet 📊 AutoIt limits/defaults 💎 Code Katas: [...] (comming soon) 🎭 Collection of GitHub users with AutoIt projects 🐞 False-Positives 🔮 Me on GitHub 💬 Opinion about new forum sub category 📑 UDF wiki list ✂ VSCode-AutoItSnippets 📑 WebDriver FAQs 👨🏫 WebDriver Tutorial (coming soon)
Nine Posted Saturday at 04:20 PM Posted Saturday at 04:20 PM 55 minutes ago, MoriceGrene said: I don't know if I have explained myself well Yes thank you. An IPC of any forms (like named pipes) are way an overkill. You could simply ControlSetText (or if more appropriate ControlSend) the button name to the second application into the input box. You don't even need to modify the second application to receive the text. It will be done easily even if the second app is not active. SOLVE-SMART 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
argumentum Posted Saturday at 05:11 PM Posted Saturday at 05:11 PM /topic/212541-wmcdipc-x32x64-useradmin-self-triggering-slow-wm_copydata-ipc/ is simple. If you need a simpler example, tell me if is "GUIOnEventMode" 0 ( in a loop ) or 1 ( OnEvent functions notifications ) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
argumentum Posted Saturday at 06:25 PM Posted Saturday at 06:25 PM (edited) expandcollapse popup#include <WMCDIPC.au3> ; https://www.autoitscript.com/forum/topic/212541-wmcdipc-x32x64-useradmin-self-triggering-slow-wm_copydata-ipc/ #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> If Not StringInStr($CmdLineRaw, "/anotherOne") Then ShellExecute(@AutoItExe, '"' & @ScriptFullPath & '" /anotherOne') ; oppened another ( just for you =D ) EndIf Exit Example() ; in the loop Func Example() #Region ### START Koda GUI section ### Form= Local $iFormWidth = 400 Local $iFormHeight = 400 Local $Form1 = GUICreate("WMCDIPC example on PID:" & @AutoItPID, $iFormWidth, $iFormHeight) Local $aWinList = WinList("WMCDIPC example on PID:") ; so that you can see both GUIs loaded WinMove($Form1, "", (@DesktopWidth / 3) + UBound($aWinList) * 100, (@DesktopHeight / 3) + UBound($aWinList) * 40) Local $ButtonSend = GUICtrlCreateButton("Send", 10, 10, 75, 25) Local $Input1 = GUICtrlCreateInput("My message to another", 100, 10, $iFormWidth - 110, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlCreateGroup("Received", 10, 50, $iFormWidth - 20, $iFormHeight - 60, -1, $WS_EX_STATICEDGE) Local $Edit1 = GUICtrlCreateEdit("", 20, 65, $iFormWidth - 40, $iFormHeight - 85, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlSetData($Edit1, @CRLF & @TAB & "Received will show here") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### WMCDIPC_Register() ; register the message handler While 1 WMCDIPC_Receive_Example($Edit1) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($Form1) Return Case $ButtonSend WMCDIPC_Send_Example($Form1, GUICtrlRead($Input1)) GUICtrlSetData($Edit1, @CRLF & @TAB & "Sent to " & @extended & " others") EndSwitch WEnd EndFunc ;==>Example Func WMCDIPC_Send_Example($hGUI, $sStr) Local $iCount = 0, $aWinList = WinList("WMCDIPC example on PID:") For $n = 1 To UBound($aWinList) - 1 If StringInStr($aWinList[$n][0], "PID:" & @AutoItPID) Then ContinueLoop ; don't send to itself ConsoleWrite($aWinList[$n][1] & @TAB & $aWinList[$n][0] & @CRLF) WMCDIPC_Send($hGUI, $aWinList[$n][1], 1, $sStr) ; send to others that may be loaded $iCount += 1 Next Return SetError(0, $iCount, $iCount) EndFunc ;==>WMCDIPC_Send_Example Func WMCDIPC_Receive_Example($iCtrl) Local Static $iLastCount = 0 Local $aDataArray = WMCDIPC_MsgData() Local Enum $eWMCDIPC_Adlib, $eWMCDIPC_receiver, $eWMCDIPC_iMsg, $eWMCDIPC_sender, $eWMCDIPC_int, $eWMCDIPC_string, _ $eWMCDIPC_TimerDiff, $eWMCDIPC_TimerInit, $eWMCDIPC_MsgCounter, $eWMCDIPC_CaughtCounter, $eWMCDIPC_UBound If $iLastCount = $aDataArray[$eWMCDIPC_MsgCounter] Then Return ; because there is nothing new $iLastCount = $aDataArray[$eWMCDIPC_MsgCounter] Local $sStr = (@AutoItX64 ? "64bit" : "32bit") & " / " & (IsAdmin() ? "Admin" : "User") & ' level - ( UDF ver.: ' & WMCDIPC_Version() & ' )' & @CRLF & @CRLF $sStr &= "- receiver >" & $aDataArray[$eWMCDIPC_receiver] & '<' & @CRLF $sStr &= "- iMsg >0x" & Hex($aDataArray[$eWMCDIPC_iMsg], 4) & '<' & @CRLF $sStr &= "- sender >" & $aDataArray[$eWMCDIPC_sender] & '<' & @CRLF $sStr &= "- data >0x" & Hex($aDataArray[$eWMCDIPC_int], 4) & '< ' & ($aDataArray[$eWMCDIPC_int] = 0xFADE ? "the other script failed to act on this" : (Mod($aDataArray[$eWMCDIPC_int], 5) ? "" : " will return ""sup !""")) & @CRLF & @CRLF $sStr &= "- string >" & $aDataArray[$eWMCDIPC_string] & '<' & @CRLF & @CRLF ; all you would care about I guess $sStr &= "- MsgHandler >" & $aDataArray[$eWMCDIPC_TimerDiff] & '< time spent receiving' & @CRLF $sStr &= "- MsgHandler >" & TimerDiff($aDataArray[$eWMCDIPC_TimerInit]) & '< time it took to get here' & @CRLF $sStr &= "- MsgHandler >" & $aDataArray[$eWMCDIPC_MsgCounter] & '< Incoming messages count' & @CRLF ; These two should $sStr &= "- MsgHandler >" & $aDataArray[$eWMCDIPC_CaughtCounter] & '< Messages caught count' & @CRLF ; be the same count. $sStr &= @CRLF GUICtrlSetData($iCtrl, $sStr) WMCDIPC_MsgData(1) ; at the end to allow a next message EndFunc ;==>WMCDIPC_Receive_Example There is a simpler example for in the loop IPC. Edited Saturday at 06:37 PM by argumentum Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
MoriceGrene Posted Sunday at 10:46 AM Author Posted Sunday at 10:46 AM 16 hours ago, argumentum said: expandcollapse popup#include <WMCDIPC.au3> ; https://www.autoitscript.com/forum/topic/212541-wmcdipc-x32x64-useradmin-self-triggering-slow-wm_copydata-ipc/ #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> If Not StringInStr($CmdLineRaw, "/anotherOne") Then ShellExecute(@AutoItExe, '"' & @ScriptFullPath & '" /anotherOne') ; oppened another ( just for you =D ) EndIf Exit Example() ; in the loop Func Example() #Region ### START Koda GUI section ### Form= Local $iFormWidth = 400 Local $iFormHeight = 400 Local $Form1 = GUICreate("WMCDIPC example on PID:" & @AutoItPID, $iFormWidth, $iFormHeight) Local $aWinList = WinList("WMCDIPC example on PID:") ; so that you can see both GUIs loaded WinMove($Form1, "", (@DesktopWidth / 3) + UBound($aWinList) * 100, (@DesktopHeight / 3) + UBound($aWinList) * 40) Local $ButtonSend = GUICtrlCreateButton("Send", 10, 10, 75, 25) Local $Input1 = GUICtrlCreateInput("My message to another", 100, 10, $iFormWidth - 110, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlCreateGroup("Received", 10, 50, $iFormWidth - 20, $iFormHeight - 60, -1, $WS_EX_STATICEDGE) Local $Edit1 = GUICtrlCreateEdit("", 20, 65, $iFormWidth - 40, $iFormHeight - 85, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlSetData($Edit1, @CRLF & @TAB & "Received will show here") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### WMCDIPC_Register() ; register the message handler While 1 WMCDIPC_Receive_Example($Edit1) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($Form1) Return Case $ButtonSend WMCDIPC_Send_Example($Form1, GUICtrlRead($Input1)) GUICtrlSetData($Edit1, @CRLF & @TAB & "Sent to " & @extended & " others") EndSwitch WEnd EndFunc ;==>Example Func WMCDIPC_Send_Example($hGUI, $sStr) Local $iCount = 0, $aWinList = WinList("WMCDIPC example on PID:") For $n = 1 To UBound($aWinList) - 1 If StringInStr($aWinList[$n][0], "PID:" & @AutoItPID) Then ContinueLoop ; don't send to itself ConsoleWrite($aWinList[$n][1] & @TAB & $aWinList[$n][0] & @CRLF) WMCDIPC_Send($hGUI, $aWinList[$n][1], 1, $sStr) ; send to others that may be loaded $iCount += 1 Next Return SetError(0, $iCount, $iCount) EndFunc ;==>WMCDIPC_Send_Example Func WMCDIPC_Receive_Example($iCtrl) Local Static $iLastCount = 0 Local $aDataArray = WMCDIPC_MsgData() Local Enum $eWMCDIPC_Adlib, $eWMCDIPC_receiver, $eWMCDIPC_iMsg, $eWMCDIPC_sender, $eWMCDIPC_int, $eWMCDIPC_string, _ $eWMCDIPC_TimerDiff, $eWMCDIPC_TimerInit, $eWMCDIPC_MsgCounter, $eWMCDIPC_CaughtCounter, $eWMCDIPC_UBound If $iLastCount = $aDataArray[$eWMCDIPC_MsgCounter] Then Return ; because there is nothing new $iLastCount = $aDataArray[$eWMCDIPC_MsgCounter] Local $sStr = (@AutoItX64 ? "64bit" : "32bit") & " / " & (IsAdmin() ? "Admin" : "User") & ' level - ( UDF ver.: ' & WMCDIPC_Version() & ' )' & @CRLF & @CRLF $sStr &= "- receiver >" & $aDataArray[$eWMCDIPC_receiver] & '<' & @CRLF $sStr &= "- iMsg >0x" & Hex($aDataArray[$eWMCDIPC_iMsg], 4) & '<' & @CRLF $sStr &= "- sender >" & $aDataArray[$eWMCDIPC_sender] & '<' & @CRLF $sStr &= "- data >0x" & Hex($aDataArray[$eWMCDIPC_int], 4) & '< ' & ($aDataArray[$eWMCDIPC_int] = 0xFADE ? "the other script failed to act on this" : (Mod($aDataArray[$eWMCDIPC_int], 5) ? "" : " will return ""sup !""")) & @CRLF & @CRLF $sStr &= "- string >" & $aDataArray[$eWMCDIPC_string] & '<' & @CRLF & @CRLF ; all you would care about I guess $sStr &= "- MsgHandler >" & $aDataArray[$eWMCDIPC_TimerDiff] & '< time spent receiving' & @CRLF $sStr &= "- MsgHandler >" & TimerDiff($aDataArray[$eWMCDIPC_TimerInit]) & '< time it took to get here' & @CRLF $sStr &= "- MsgHandler >" & $aDataArray[$eWMCDIPC_MsgCounter] & '< Incoming messages count' & @CRLF ; These two should $sStr &= "- MsgHandler >" & $aDataArray[$eWMCDIPC_CaughtCounter] & '< Messages caught count' & @CRLF ; be the same count. $sStr &= @CRLF GUICtrlSetData($iCtrl, $sStr) WMCDIPC_MsgData(1) ; at the end to allow a next message EndFunc ;==>WMCDIPC_Receive_Example There is a simpler example for in the loop IPC. return me error : error: can't open include file <WMCDIPC.au3>. #include <WMCDIPC.au3> ~~~~~~~~~^ "C:\Users\pct\Desktop\NETWORK_MT5\test_IPC.au3"(30,51) : error: WMCDIPC_Register(): undefined function. WMCDIPC_Register() ; register the message handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\pct\Desktop\NETWORK_MT5\test_IPC.au3"(50,86) : error: WMCDIPC_Send(): undefined function. WMCDIPC_Send($hGUI, $aWinList[$n][1], 1, $sStr) ; send to others that may be loaded ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\pct\Desktop\NETWORK_MT5\test_IPC.au3"(58,39) : error: WMCDIPC_MsgData(): undefined function. Local $aDataArray = WMCDIPC_MsgData() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\pct\Desktop\NETWORK_MT5\test_IPC.au3"(65,138) : error: WMCDIPC_Version(): undefined function. Local $sStr = (@AutoItX64 ? "64bit" : "32bit") & " / " & (IsAdmin() ? "Admin" : "User") & ' level - ( UDF ver.: ' & WMCDIPC_Version() & ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\pct\Desktop\NETWORK_MT5\test_IPC.au3 - 5 error(s), 0 warning(s) : error: can't open include file <WMCDIPC.au3>. #include <WMCDIPC.au3> ~~~~~~~~~^ "C:\Users\pct\Desktop\NETWORK_MT5\test_IPC.au3"(30,51) : error: WMCDIPC_Register(): undefined function. WMCDIPC_Register() ; register the message handler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\pct\Desktop\NETWORK_MT5\test_IPC.au3"(50,86) : error: WMCDIPC_Send(): undefined function. WMCDIPC_Send($hGUI, $aWinList[$n][1], 1, $sStr) ; send to others that may be loaded ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\pct\Desktop\NETWORK_MT5\test_IPC.au3"(58,39) : error: WMCDIPC_MsgData(): undefined function. Local $aDataArray = WMCDIPC_MsgData() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Users\pct\Desktop\NETWORK_MT5\test_IPC.au3"(65,138) : error: WMCDIPC_Version(): undefined function. Local $sStr = (@AutoItX64 ? "64bit" : "32bit") & " / " & (IsAdmin() ? "Admin" : "User") & ' level - ( UDF ver.: ' & WMCDIPC_Version() & ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\pct\Desktop\NETWORK_MT5\test_IPC.au3 - 5 error(s), 0 warning(s) where i find this include ?
argumentum Posted Sunday at 03:05 PM Posted Sunday at 03:05 PM Goodness @MoriceGrene ! 21 hours ago, argumentum said: /topic/212541-wmcdipc-x32x64-useradmin-self-triggering-slow-wm_copydata-ipc/ is simple. If you need a simpler example, tell me if is "GUIOnEventMode" 0 ( in a loop ) or 1 ( OnEvent functions notifications ) ..but I figure you'd need it and did it anyway. 4 hours ago, MoriceGrene said: #include <WMCDIPC.au3> ; https://www.autoitscript.com/forum/topic/212541-wmcdipc-x32x64-useradmin-self-triggering-slow-wm_copydata-ipc/ 4 hours ago, MoriceGrene said: where i find this include ? It couldn't be any louder I claim to be the "king of copy and paste", but it does takes some reading. @argumentum slaps @MoriceGrene around a bit with a large trout WildByDesign 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Nine Posted Sunday at 03:44 PM Posted Sunday at 03:44 PM @MoriceGrene Did you read my post ? You could have a single line of code added to the first script that would seem to do the job ? “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
MoriceGrene Posted Sunday at 04:03 PM Author Posted Sunday at 04:03 PM 57 minutes ago, argumentum said: Goodness @MoriceGrene ! ..but I figure you'd need it and did it anyway. It couldn't be any louder I claim to be the "king of copy and paste", but it does takes some reading. @argumentum slaps @MoriceGrene around a bit with a large trout aaaa sorry for udf usally i wait see a zip or code but this time is inside of hidden contents i look noe thanks argumentum 1
MoriceGrene Posted Sunday at 04:08 PM Author Posted Sunday at 04:08 PM 20 minutes ago, Nine said: @MoriceGrene Did you read my post ? You could have a single line of code added to the first script that would seem to do the job ? Thanks i look now because in meantime i tried to follow , a way suggest of @SOLVE-SMART but for my case not work good because i have other adlibregister and othe function in while 1 that create some problem therfore sometime go and somtime not go , thefore now testo your solution and after , the big solution ipc hell
MoriceGrene Posted Sunday at 04:15 PM Author Posted Sunday at 04:15 PM 29 minutes ago, Nine said: @MoriceGrene Did you read my post ? You could have a single line of code added to the first script that would seem to do the job ? is almosto good solution but for my case i want when arrive a number start also a procedure , but is a good way
Nine Posted Sunday at 05:05 PM Posted Sunday at 05:05 PM 46 minutes ago, MoriceGrene said: but for my case i want when arrive a number start also a procedure I do not see a problem there. If you could post a SMALL snippet of both your apps, I am sure we can manage to make it work effortless. For example the procedure that you want to start can be just a consoleWrite, we do not need your full code, just a skeleton with a few buttons and the input box. “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
MoriceGrene Posted Sunday at 05:14 PM Author Posted Sunday at 05:14 PM 7 minutes ago, Nine said: I do not see a problem there. If you could post a SMALL snippet of both your apps, I am sure we can manage to make it work effortless. For example the procedure that you want to start can be just a consoleWrite, we do not need your full code, just a skeleton with a few buttons and the input box. It's not that I don't want to share the code, but creating a snippet that runs like the code I wrote takes me a lot of time. The two applications communicate via a DLL with a third non-AutoIt application, and I wanted to avoid using the DLL I already have to keep the logic separate and not complicate debugging. The IPC solution by @argumentum could have been right for me, but it's already too complicated for someone like me who doesn't know IPC well, and I wanted to finish this project as quickly as possible because I have other things to do. So, in the end, I whined and complained, hooked up the DLL, and moved on—so I've already done it. But next time something like this happens, I promise I'll put in more effort to look into both solutions better. Thanks again, everyone.
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