-
Posts
5,431 -
Joined
-
Last visited
-
Days Won
181
argumentum last won the day on December 18
argumentum had the most liked content!
About argumentum

Profile Information
-
Member Title
✨Universalist ✨
-
Location
I'm in your browser now =)
-
WWW
https://www.youtube.com/watch?v=SjwX-zMRxO0&t=5s
-
Interests
Relax
argumentum's Achievements
-
argumentum reacted to a post in a topic:
WebView2AutoIt - AutoIt WebView2 Component (COM Interop)
-
argumentum reacted to a post in a topic:
WebView2AutoIt - AutoIt WebView2 Component (COM Interop)
-
mLipok reacted to a post in a topic:
Avoid "AutoIt Error" message box in unknown errors
-
argumentum reacted to a post in a topic:
Running an EXE, but need correct syntax to accommodate the EXE utilizing its .ini info - (Moved)
-
ACCTE reacted to a post in a topic:
Running an EXE, but need correct syntax to accommodate the EXE utilizing its .ini info - (Moved)
-
ioa747 reacted to a post in a topic:
WebView2AutoIt - AutoIt WebView2 Component (COM Interop)
-
WebView2AutoIt - AutoIt WebView2 Component (COM Interop)
argumentum replied to ioa747's topic in C# / .NET
If MsgBox(36, "Confirm", "Exit Application?", 0, $hGUI) = 6 Then Exit is better because it will disable the GUI while MsgBox() is active. Is there a way to do all these without registering a DLL ? - I hope someone with more knowledge can shed some light on the thread. Ok, but, it would be nicer, even if not better than this way. Thanks for the code -
argumentum reacted to a post in a topic:
WebView2AutoIt - AutoIt WebView2 Component (COM Interop)
-
argumentum reacted to a post in a topic:
WebView2AutoIt - AutoIt WebView2 Component (COM Interop)
-
WebView2AutoIt - AutoIt WebView2 Component (COM Interop)
argumentum replied to ioa747's topic in C# / .NET
@argumentum, please run WebView2AutoIt_v0.1\NetWebView2Lib\WebView2AutoIt\register_web2.au3 and it should work after that. Do place the project in a local drive -
WebView2AutoIt - AutoIt WebView2 Component (COM Interop)
argumentum replied to ioa747's topic in C# / .NET
--------------------------- Error --------------------------- Could not create WebView2 Manager. Please register the DLL. --------------------------- OK --------------------------- 😭 -
Avoid "AutoIt Error" message box in unknown errors
argumentum replied to EKY32's topic in AutoIt General Help and Support
@jpm sent the fix to Jon. I guess we'll see the fix in the next release -
argumentum reacted to a post in a topic:
Eigen4AutoIt - Matrix computing with Eigen
-
argumentum reacted to a post in a topic:
WinRT Object Libraries
-
argumentum reacted to a post in a topic:
AutoIt Snippets
-
wakillon reacted to a post in a topic:
AutoIt Snippets
-
argumentum reacted to a post in a topic:
Native win8+ toast notifications
-
WildByDesign reacted to a post in a topic:
How to change state of context menu items
-
How to change state of context menu items
argumentum replied to WildByDesign's topic in AutoIt GUI Help and Support
; right click on gui to bring up context Menu. DONE ; right click on the "ok" button to bring up a controll specific context menu. YOUR TURN TO CODE IT #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Global $idMni_About ;~ HotKeySet("{Esc}", "_disable") Example() Func Example() Local $hGui = GUICreate("My GUI Context Menu", 300, 200) Local $idContextmenu = GUICtrlCreateContextMenu(GUICtrlCreateDummy()) Local $idMnu_Newsub = GUICtrlCreateMenu("new", $idContextmenu) Local $idMni_NewsubmenuText = GUICtrlCreateMenuItem("text", $idMnu_Newsub) Local $idButton = GUICtrlCreateButton("on", 100, 100, 70, 20) Local $idMni_AboutCM = GUICtrlCreateContextMenu(GUICtrlCreateDummy()) Local $idMni_About = GUICtrlCreateMenuItem("About button", $idMni_AboutCM) Local $idMni_Open = GUICtrlCreateMenuItem("Open", $idContextmenu) Local $idMni_Save = GUICtrlCreateMenuItem("Save", $idContextmenu) GUICtrlCreateMenuItem("", $idContextmenu) ; separator Local $idMni_Info = GUICtrlCreateMenuItem("Info", $idContextmenu) GUISetState(@SW_SHOW) While 1 ; Loop until the user exits. Switch GUIGetMsg() Case $GUI_EVENT_SECONDARYUP $aCursorInfo = GUIGetCursorInfo($hGui) If @error Then ContinueLoop ConsoleWrite('- $GUI_EVENT_SECONDARYUP - ' & $aCursorInfo[4] & @CRLF) If UBound($aCursorInfo) = 5 And GUICtrlRead($idButton) = 'on' Then Switch $aCursorInfo[4] Case 0 TrackPopupMenu($hGui, GUICtrlGetHandle($idContextmenu), MouseGetPos(0), MouseGetPos(1)) Case Else ; ..you do your part too =P TrackPopupMenu($hGui, GUICtrlGetHandle($idMni_AboutCM), MouseGetPos(0), MouseGetPos(1)) EndSwitch EndIf Case $idButton If GUICtrlRead($idButton) = 'on' Then GUICtrlSetData($idButton, 'off') Else GUICtrlSetData($idButton, 'on') EndIf Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() EndFunc ;==>Example ;~ Func _disable() ;~ GUICtrlSetState($idMni_About, $GUI_DISABLE) ;~ ConsoleWrite("Disable context menu item, please." & @CRLF) ;~ EndFunc ; Show at the given coordinates (x, y) the popup menu (hMenu) which belongs to a given GUI window (hWnd) Func TrackPopupMenu($hWnd, $hMenu, $x, $y) DllCall("user32.dll", "int", "TrackPopupMenuEx", "hwnd", $hMenu, "int", 0, "int", $x, "int", $y, "hwnd", $hWnd, "ptr", 0) EndFunc ;==>TrackPopupMenu -
... Func _WinRT_Startup() If Not @AutoItX64 Then Return SetError(1, 0, 1) ... Func _WinUI3_Startup($iMajorVers = Default, $iMinorVers = Default, $sVersionTag = Default, $iMinVers = Default, $iOptions = Default) If Not @AutoItX64 Then Return SetError(1, 0, False) ... #include "WinUIBase.au3" If Not @AutoItX64 Then Exit ConsoleWrite(@CRLF & '@@(' & @ScriptLineNumber & ') : Needs to run x64.' & @CRLF) _WinRT_Startup() If @error Then Exit ConsoleWrite(@CRLF & '@@(' & @ScriptLineNumber & ') : Error=' & @error & @CRLF) _WinUI3_Startup() If @error Then Exit ConsoleWrite(@CRLF & '@@(' & @ScriptLineNumber & ') : Error=' & @error & @CRLF) ... ..something to let the user know that is not running x64. And since the default install runs x86 for compatibility, when click-click from Explorer, the "#AutoIt3Wrapper_UseX64=y" is not going to do it's thing.
-
(10,0) [0x00000000] The operation completed successfully. > +>09:57:56 AutoIt3 ended. rc:0 That did it. Thanks
-
(9,0) [0x00000000] The operation completed successfully. > !>23:39:47 AutoIt3 ended. rc:-1073741819 🤷♂️ On 23H2, #AutoIt3Wrapper_UseX64=y
-
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
-
There is a simpler example for in the loop IPC here.
- 5 replies
-
- wm_copydata
- ipc
-
(and 3 more)
Tagged with:
-
#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.
-
/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 )