piccaso Posted March 5, 2006 Posted March 5, 2006 (edited) Its nothing special, but i had a hard time working it out... Reciver:; Windows Definitions Global Const $StructDef_COPYDATA = "ptr;dword;ptr" Global Const $WM_COPYDATA = 0x4A Global Const $WM_CLOSE = 0x10 ; The costum Struct (Must be the same in Sender and Recivcer) Global Const $STRUCTDEF_AU3MESSAGE = "char[256];int" ; Create Reciver window $hwmd_Reciver = GUICreate("CopyDataRcv") ; Register Windows Messages GUIRegisterMsg($WM_COPYDATA, "_GUIRegisterMsgProc") GUIRegisterMsg($WM_CLOSE, "_GUIRegisterMsgProc") ; Message Handler Func _GUIRegisterMsgProc($hWnd, $MsgID, $WParam, $LParam) If $MsgID = $WM_COPYDATA Then ; We Recived a WM_COPYDATA Message ; $LParam = Poiter to a COPYDATA Struct $vs_cds = DllStructCreate($StructDef_COPYDATA, $LParam) ; Member No. 3 of COPYDATA Struct (PVOID lpData;) = Pointer to Costum Struct $vs_msg = DllStructCreate($STRUCTDEF_AU3MESSAGE, DllStructGetData($vs_cds, 3)) ; Display what we have recived MsgBox(0, "Test String", DllStructGetData($vs_msg, 1)) MsgBox(0, "Test Integer", DllStructGetData($vs_msg, 2)) ElseIf $MsgID = $WM_CLOSE Then ; We Recived a WM_CLOSE Message Exit EndIf EndFunc ;==>_GUIRegisterMsgProc ; Keep it Runnig ... While 1 Sleep(250) WEndmaybe its usefull to someone else too Edited May 20, 2006 by piccaso CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map
eltorro Posted May 23, 2007 Posted May 23, 2007 I find it hard to believe that not one person has made a comment on this since it was posted more than a year ago. Good work picasso , this is exactly what I was looking for. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code
Generator Posted May 23, 2007 Posted May 23, 2007 Very useful, now script can communicate with script
lsakizada Posted January 28, 2008 Posted January 28, 2008 Its nothing special, but i had a hard time working it out... Reciver:; Windows Definitions Global Const $StructDef_COPYDATA = "ptr;dword;ptr" Global Const $WM_COPYDATA = 0x4A Global Const $WM_CLOSE = 0x10 ; The costum Struct (Must be the same in Sender and Recivcer) Global Const $STRUCTDEF_AU3MESSAGE = "char[256];int" ; Create Reciver window $hwmd_Reciver = GUICreate("CopyDataRcv") ; Register Windows Messages GUIRegisterMsg($WM_COPYDATA, "_GUIRegisterMsgProc") GUIRegisterMsg($WM_CLOSE, "_GUIRegisterMsgProc") ; Message Handler Func _GUIRegisterMsgProc($hWnd, $MsgID, $WParam, $LParam) If $MsgID = $WM_COPYDATA Then ; We Recived a WM_COPYDATA Message ; $LParam = Poiter to a COPYDATA Struct $vs_cds = DllStructCreate($StructDef_COPYDATA, $LParam) ; Member No. 3 of COPYDATA Struct (PVOID lpData;) = Pointer to Costum Struct $vs_msg = DllStructCreate($STRUCTDEF_AU3MESSAGE, DllStructGetData($vs_cds, 3)) ; Display what we have recived MsgBox(0, "Test String", DllStructGetData($vs_msg, 1)) MsgBox(0, "Test Integer", DllStructGetData($vs_msg, 2)) ElseIf $MsgID = $WM_CLOSE Then ; We Recived a WM_CLOSE Message Exit EndIf EndFunc ;==>_GUIRegisterMsgProc ; Keep it Runnig ... While 1 Sleep(250) WEndmaybe its usefull to someone else too I found this old post and i have interest to get idea how it is working? Can someone would be able to help with examples? Best Regards Be Green Now or Never (BGNN)!
martin Posted January 29, 2008 Posted January 29, 2008 no exemple ?Half an example. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
tip Posted May 20, 2009 Posted May 20, 2009 Sorry to bump an old one but does anyone have a working example. I'm having a hard time figuring it out... Thanks in advance... Tip [center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]
Yashied Posted May 20, 2009 Posted May 20, 2009 Sorry to bump an old one but does anyone have a working example. I'm having a hard time figuring it out...Thanks in advance...Tiphttp://www.autoitscript.com/forum/index.php?s=&showtopic=94887&view=findpost&p=681941 My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
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