McGod Posted December 15, 2007 Share Posted December 15, 2007 I'm trying to recieve a WM_COPYDATA. Code: #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Autoit Form", 508, 579, 193, 125) GUIRegisterMsg($WM_COPYDATA, "Hmmmm") $Edit1 = GUICtrlCreateEdit("", 0, 0, 505, 577) GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Hmmmm ($hWnd, $iMsgID, $WParam, $LParam) GUICtrlSetData($Edit1, "Window: " & WinGetTitle($hWnd) & @CRLF & _ "iMsgId: " & $iMsgID & @CRLf & _ "WParam: " & $WParam & @CRLF & _ "LParam: " & $LParam & @CRLF & _ "GetData: " & DllStructGetData($LParam, 0) & @CRLF & _ "GetSize: " & DllStructGetSize($LParam),1) EndFunc Example of what i Get: Window: Autoit Form iMsgId: 74 WParam: 0x00520672 LParam: 0x0089F774 GetData: 0 GetSize: 0 AFAIK, LParam points to a copydatastruct, any help, I'm total noob when it comes to structs and dll calls:X [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
Developers Jos Posted December 15, 2007 Developers Share Posted December 15, 2007 this is what I used for the SciTE interface:; Received Data from SciTE Func MY_WM_COPYDATA($hWnd, $msg, $wParam, $lParam) Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr',$lparam) $SciTECmdLen = DllStructGetData($COPYDATA, 2) Local $CmdStruct = DllStructCreate('Char['&$SciTECmdLen+1&']',DllStructGetData($COPYDATA, 3)) $SciTECmd = Stringleft(DllStructGetData($CmdStruct, 1),$SciTECmdLen) ConsoleWrite('<--' & $SciTECmd & @lf ) EndFunc ;==>MY_WM_COPYDATA SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
McGod Posted December 15, 2007 Author Share Posted December 15, 2007 Works perfectly ty:D [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
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