teknomage Posted April 2, 2009 Posted April 2, 2009 Hi! I'm new here, although I have been coding with AutoIT for the past 6 months. I need help with an idea I have in mind. I am writing an application in AutoIT to capture text from a third-party program that does not use standard Windows controls. So, when I use Au3 Info, none of the text on that program shows up under Visible text nor Hidden text. From what I've gathered so far, I understand that creating hooks to capture text from API functions such as DrawText, ExtTextOut, etc is the best way to go.My question is this: is it not possible to create hooks within my AutoIT exe in order to capture text from the third-party program, rather than creating a DLL in some other language and then calling it from my AutoIT exe?? I've managed to find a couple of neat examples on how to do this for the TextOut API function but the code is in PowerBASIC. And I havent the foggiest idea as to how I can translate PowerBASIC into AutoIT. If anyone's interested, the PowerBASIC examples can be found here:http://www.powerbasic.com/support/pbforums...ead.php?t=23093http://www.powerbasic.com/support/pbforums...ead.php?t=21331If there's someone here who can shining a guiding light or provide a few AutoIT code snippets, I'd be most grateful. Thanx in advance!!!
ProgAndy Posted April 2, 2009 Posted April 2, 2009 (edited) To hook functions in external applications, you need a DLL. Since AutoIt can't be compiled as DLL, this it not possible to install a hook in an external appliaction. You always need a DLL in another language. What you can do in AutoIt is to inject the e.g. powerbasic-DLl into another process and receive messages from it.//Edit: Here is an example: http://www.autoitscript.com/forum/index.php?showtopic=87240 Edited April 2, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
Deito Posted October 27, 2010 Posted October 27, 2010 Trying to get a text from a non standard component. One way textout hook. Has anyone tried to connect third-party dll? For example DLL written in Power Basic... Maybe all the same through the Autoit?
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