LDericher Posted April 28, 2009 Posted April 28, 2009 (edited) Hi, just stumbled in here^^, Has anyone got an Idea how to realize this? I've got a delphi-written program that can't send certain messages to certain windows. But AutoIt can! So, my question is: Is it possible for an AutoIt-written program to wait for messages? I don't want to have another GUI messing around on my screen so, I'm dreaming of a call of this WinAPI-func postmessage/sendmessage in my Delphi-prog that sends ASCII-Codes to my AU3-script(running in the background) which is only waiting for these messages and then distributes them to the window I want them in. Oh, what a sentence... can you still follow me? Good By the way: Even if it may sound like that, I don't want to create any Bot or Virus with this knowledge! If this was here already, please simply post a link to the old topic: I didn't know what to search for. Thanks for giving me some of your time, The LDer Edit_1: If you don't understand what I need, pls post so I can try to make clearer. Edited April 28, 2009 by LDericher
Juvigy Posted April 28, 2009 Posted April 28, 2009 Short - yes it is possible. Long - for how to do it we will need a lot more details
Yashied Posted April 28, 2009 Posted April 28, 2009 If I understood you correctly then see the following examples.Receiver#Include <GuiConstantsEx.au3> #Include <WinApi.au3> global $MsgFlag = 0 $iMsg = _WinAPI_RegisterWindowMessage('MyProg_Msg') GUICreate('') GUIRegisterMsg($iMsg, "Receiver") do if $MsgFlag then MsgBox(0, "", "OK!") $MsgFlag = 0 endif until GUIGetMsg() = $GUI_EVENT_CLOSE func Receiver($hWnd, $iMsg, $iwParam, $ilParam) if $iwParam = 1 then $MsgFlag = 1 endif endfunc; ReceiveroÝ÷ ÚæÒzw^¯öÿ¹«¢+Ø%¹±Õ±Ðí]¥¹Á¤¹ÔÌÐì((ÀÌØí¥5Íô}]¥¹A%}I¥ÍÑÉ]¥¹½Ý5ÍÍ ÅÕ½Ðí5åAɽ}5ÍÅÕ½Ðì¤)}M¹5ÍÍ Áá°ÀÌØí¥5ͰĤ 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...
LDericher Posted April 28, 2009 Author Posted April 28, 2009 Sorry, but, can you explain your code? I'm new to this language so, I rather like Delphi^^ Anyway, I would like to send 246 different messages (ASCII 1-123 down and up) and have an Event, so like this: Delphi sends: SendMessage(AU3GUIHandle, WM_MyMsg, x, 0); (while X is my number) and in the AU3 the receiver: Func OnMyMsg($MyMsg) WinActivate(...) Sleep(...);Whatever;) and something that can call it: [dontknowhowthislookslike]oO[/dontknowhowthislookslike] Regards, the LDer
ChrisL Posted April 28, 2009 Posted April 28, 2009 See here http://www.autoitscript.com/forum/index.php?showtopic=77979 [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
LDericher Posted April 29, 2009 Author Posted April 29, 2009 Now, can someone explain the "DllStruct" to make it some clearer? I think it's a kind of dynamic Array, am I right? Or does Someoneknow how to build the DllStruct in Delphi? Would be fine xD LDer.
Yashied Posted April 29, 2009 Posted April 29, 2009 (edited) Now, can someone explain the "DllStruct" to make it some clearer?I think it's a kind of dynamic Array, am I right?Or does Someoneknow how to build the DllStruct in Delphi? Would be fine xDLDer.No need to create DllStruct in Delphi, there is a composite (Record) data types. ChrisL`s example based on WM_COPYDATA and only uses the WinAPI. All this can be implemented in Delphi. In my opinion AutoIt and Delphi looks very similar. At the expense of DllStrict see this.Edit.There are many ways to exchange data between processes, such as the following:Memory-mapped filesWM_COPYDATAPipesMailslotsetc.All this can be implemented in Delphi. Edited April 29, 2009 by Yashied 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...
LDericher Posted April 29, 2009 Author Posted April 29, 2009 I've made this a new topic, because my needs have changed again:http://www.autoitscript.com/forum/index.php?showtopic=94083Regards by The LDer
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