ptrex Posted April 18, 2006 Share Posted April 18, 2006 I have been struggling to read data for a non-windows control. But is there anyone who can show me how to read data from a NORMAL WINDOWS control. I can hide, move, read the control text, ... anything you want, but not the data ? Is it that difficult to do ? If it is not possible can someone tell me why ? Thanks Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
GaryFrost Posted April 19, 2006 Share Posted April 19, 2006 I have been struggling to read data for a non-windows control. But is there anyone who can show me how to read data from a NORMAL WINDOWS control.I can hide, move, read the control text, ... anything you want, but not the data ?Is it that difficult to do ?If it is not possible can someone tell me why ?Thanksusing controlgethandle most can be done.Take a look at the include files for the beta, GuiCombo, GuiList, GuiListView to name a fewYou'll see if statements to check if it is a handle or control id being passed in.Also if you want to find out more about the messages being used look at Individual Control InformationGary SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
ptrex Posted April 19, 2006 Author Share Posted April 19, 2006 @gafrost Thanks for the tips. I' ll have a look. The plan of attack is that I will try to get to read data from a windows control. Than I will try to transpose that to a non windows control. If I find the solution I post it back to share. ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
ptrex Posted April 21, 2006 Author Share Posted April 21, 2006 (edited) Read data from Any Windows Edit ControlThis is an example of how to read data from an Edit control, like notepad.This was realized due to the tips and help of gafrost !!expandcollapse popup; My first DLLCall ; ptrex #include <GUIConstants.au3> #include <GUIedit.au3> Opt("WinTitleMatchMode", 4); Allow ClassName lookup Global Const $EM_GETLINE = 0xC4 Dim $LineCount Dim $LineNum Dim $Ret Dim $LineLen Dim $FirstCharPos Dim $Buffer Const $Applhandle = WinGetHandle("classname=Notepad") Const $Ctrlhandle = ControlGetHandle("","",15) WinWaitActive($Applhandle) sleep(500) WinHandle() ;CtrlReadLineNum($Ctrlhandle) ;LineIndex($Ctrlhandle) ;LineLenght($Ctrlhandle) CtrlRead($Ctrlhandle) Func WinHandle(); tested = OK $result = DllCall("user32.dll", "int", "MessageBox", "hwnd", 0, "str", "Window Active " & $Ctrlhandle, "str", "Handle Test" , "int", 0) EndFunc Func CtrlReadLineNum($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEditGetLineCount($Ctrlhandle) MsgBox(0,"Test","Line #" & " "& $Ctrlread) EndFunc Func LineIndex($Ctrlhandle); tested = OK $Ctrlread =_GUICtrlEditLineIndex($Ctrlhandle) MsgBox(0,"Test","Line Index" & " "& $Ctrlread) EndFunc Func LineLenght($Ctrlhandle); tested = OK $Ctrlread =_GUICtrlEditLineLength($Ctrlhandle) MsgBox(0,"Test","Line Lenght" & " "& $Ctrlread) EndFunc Func CtrlRead($Ctrlhandle); tested = OK $LineCount = _GUICtrlEditGetLineCount($Ctrlhandle) MsgBox(0, "Test", "Line #" & " " & $LineCount) For $LineNum = 0 To $LineCount - 1 $FirstCharPos = _GUICtrlEditLineIndex($Ctrlhandle, $LineNum) MsgBox(0, "Test", "First Char Pos on Line IDX: " & $FirstCharPos) $LineLen = _GUICtrlEditLineLength($Ctrlhandle, $FirstCharPos) MsgBox(0, "Test", "Length: " & $LineLen) $Buffer = $LineLen $Ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $Ctrlhandle, "int", $EM_GETLINE, "int", $LineNum, "str", "") MsgBox(0, "Test", "Text is =" & " " & $Ret[4]) Next EndFunc ;==>CtrlReadOpen notepad type a few lines of text and run the code. Edited September 14, 2012 by ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
kastra Posted July 30, 2007 Share Posted July 30, 2007 ERROR: $EM_GETLINE previously declared as a 'Const' hmm ?? Line 8 --> Global Const $EM_GETLINE = 0xC4 Link to comment Share on other sites More sharing options...
GaryFrost Posted August 1, 2007 Share Posted August 1, 2007 ERROR: $EM_GETLINE previously declared as a 'Const'hmm ?? Line 8 --> Global Const $EM_GETLINE = 0xC4This topic is from a year ago, includes have changed since then. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Skrip Posted September 1, 2008 Share Posted September 1, 2008 This works: expandcollapse popup; My first DLLCall ; ptrex #include <GUIConstants.au3> #include <GuiConstantsEx.au3> #include <GUIedit.au3> Opt("WinTitleMatchMode", 4); Allow ClassName lookup ;~ Global Const $EM_GETLINE = 0xC4 Dim $LineCount Dim $LineNum Dim $Ret Dim $LineLen Dim $FirstCharPos Dim $Buffer Const $Applhandle = WinGetHandle("classname=Notepad") Const $Ctrlhandle = ControlGetHandle("","",15) WinWaitActive($Applhandle) sleep(500) WinHandle() ;CtrlReadLineNum($Ctrlhandle) ;LineIndex($Ctrlhandle) ;LineLenght($Ctrlhandle) CtrlRead($Ctrlhandle) Func WinHandle(); tested = OK $result = DllCall("user32.dll", "int", "MessageBox", "hwnd", 0, "str", "Window Active " & $Ctrlhandle, "str", "Handle Test" , "int", 0) EndFunc Func CtrlReadLineNum($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEdit_GetLineCount($Ctrlhandle) MsgBox(0,"Test","Line #" & " "& $Ctrlread) EndFunc Func LineIndex($Ctrlhandle); tested = OK $Ctrlread =_GUICtrlEdit_LineIndex($Ctrlhandle) MsgBox(0,"Test","Line Index" & " "& $Ctrlread) EndFunc Func LineLenght($Ctrlhandle); tested = OK $Ctrlread =_GUICtrlEdit_LineLength($Ctrlhandle) MsgBox(0,"Test","Line Lenght" & " "& $Ctrlread) EndFunc Func CtrlRead($Ctrlhandle); tested = OK $LineCount = _GUICtrlEdit_GetLineCount($Ctrlhandle) MsgBox(0, "Test", "Line #" & " " & $LineCount) For $LineNum = 0 To $LineCount - 1 $FirstCharPos = _GUICtrlEdit_LineIndex($Ctrlhandle, $LineNum) MsgBox(0, "Test", "First Char Pos on Line IDX: " & $FirstCharPos) $LineLen = _GUICtrlEdit_LineLength($Ctrlhandle, $FirstCharPos) MsgBox(0, "Test", "Length: " & $LineLen) $Buffer = $LineLen $Ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $Ctrlhandle, "int", $EM_GETLINE, "int", $LineNum, "str", "") MsgBox(0, "Test", "Text is =" & " " & $Ret[4]) Next EndFunc;==>CtrlRead I was trying to get it to work from an input with $ES_PASSWORD, seems to lockup and do nothing. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Stevo Posted May 2, 2009 Share Posted May 2, 2009 (edited) Hi Ptrex, I have mad minor changes -Its basicaly similar to Firestorm version above- to compile and run on v3.2.12.1. Now for text= I get empty string. That is reading $Ret[4]. What I might be doing wrong? Here is my script: expandcollapse popup#Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_outfile=readData.exe #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** ; My first DLLCall ; ptrex #include <GUIConstants.au3> #include <GuiConstantsEx.au3> #include <GUIedit.au3> Opt("WinTitleMatchMode", 4); Allow ClassName lookup ; Global Const $EM_GETLINE = 0xC4 Dim $LineCount Dim $LineNum Dim $Ret Dim $LineLen Dim $FirstCharPos Dim $Buffer Const $Applhandle = WinGetHandle("classname=Notepad") Const $Ctrlhandle = ControlGetHandle("","",15) WinWaitActive($Applhandle) sleep(500) WinHandle() ;CtrlReadLineNum($Ctrlhandle) ;LineIndex($Ctrlhandle) ;LineLenght($Ctrlhandle) CtrlRead($Ctrlhandle) Func WinHandle(); tested = OK $result = DllCall("user32.dll", "int", "MessageBox", "hwnd", 0, "str", "Window Active " & $Ctrlhandle, "str", "Handle Test" , "int", 0) EndFunc Func CtrlReadLineNum($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEdit_GetLineCount($Ctrlhandle) MsgBox(0,"Test","Line #" & " "& $Ctrlread) EndFunc Func LineIndex($Ctrlhandle); tested = OK $Ctrlread =_GUICtrlEdit_LineIndex($Ctrlhandle) MsgBox(0,"Test","Line Index" & " "& $Ctrlread) EndFunc Func LineLenght($Ctrlhandle); tested = OK $Ctrlread =_GUICtrlEdit_LineLength($Ctrlhandle) MsgBox(0,"Test","Line Lenght" & " "& $Ctrlread) EndFunc Func CtrlRead($Ctrlhandle); tested = OK $LineCount = _GUICtrlEdit_GetLineCount($Ctrlhandle) MsgBox(0, "Test", "Line #" & " " & $LineCount) For $LineNum = 0 To $LineCount - 1 $FirstCharPos = _GUICtrlEdit_LineIndex($Ctrlhandle, $LineNum) MsgBox(0, "Test", "First Char Pos on Line IDX: " & $FirstCharPos) $LineLen = _GUICtrlEdit_LineLength($Ctrlhandle, $FirstCharPos) MsgBox(0, "Test", "Length: " & $LineLen) $Buffer = $LineLen $Ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $Ctrlhandle, "int", $EM_GETLINE, "int", $LineNum, "str", "") MsgBox(0, "Test", "Text is =" & " " & $Ret[4]) Next EndFunc;==>CtrlRead Many thanks. Steven Edited May 2, 2009 by Stevo Link to comment Share on other sites More sharing options...
Malkey Posted May 2, 2009 Share Posted May 2, 2009 Hi Ptrex, I have mad minor changes -Its basicaly similar to Firestorm version above- to compile and run on v3.2.12.1. Now for text= I get empty string. That is reading $Ret[4]. What I might be doing wrong? Many thanks. StevenSteven You might not have any text in Notepad that can be read to put into $Ret[4]. Malkey. Link to comment Share on other sites More sharing options...
Stevo Posted May 2, 2009 Share Posted May 2, 2009 (edited) Hi Malkey, Many thanks for your quick reply. I do have text in notepad. I tested this again a minute ago. I typed in a simple word -my name- on notepad and then ran the script. I get everything right except the text is empty again. Would you by any chance have another working script you can post here please? Basically I need to read data from 3rd party application richtext editcontrols such as notepad, etc. This is not possible using ControlGetText() because of being richtext... Regards, Steven Regards, Steven Edited May 2, 2009 by Stevo Link to comment Share on other sites More sharing options...
Malkey Posted May 2, 2009 Share Posted May 2, 2009 Hi Malkey, Many thanks for your quick reply. I do have text in notepad. I tested this again a minute ago. I typed in a simple word -my name- on notepad and then ran the script. I get everything right except the text is empty again. Would you by any chance have another working script you can post here please? Basically I need to read data from 3rd party application richtext editcontrols such as notepad, etc. This is not possible using ControlGetText() because of being richtext... Regards, Steven Regards, StevenI was messing around with this one until I realized your script worked. This one also works on my XP. expandcollapse popup#Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=readData.exe #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** ; My first DLLCall ; ptrex #include <GUIConstants.au3> #include <GuiConstantsEx.au3> #include <GUIedit.au3> ;Opt("WinTitleMatchMode", 4); Allow ClassName lookup ; Global Const $EM_GETLINE = 0xC4 Dim $LineCount Dim $LineNum Dim $Ret Dim $LineLen Dim $FirstCharPos Dim $Buffer WinActivate("[class:Notepad]", "") WinWaitActive("[class:Notepad]", "") Local $Applhandle = WinGetHandle(""); [class:Notepad]") Local $Ctrlhandle = ControlGetHandle("", "", "Edit1") ConsoleWrite("$Ctrlhandle " & $Ctrlhandle & @CRLF) WinHandle() ;CtrlReadLineNum($Ctrlhandle) ;LineIndex($Ctrlhandle) ;LineLenght($Ctrlhandle) CtrlRead($Ctrlhandle) $str = ControlGetText("", "", "[Class:Edit]") ;MsgBox(0,"Test",$str) Func WinHandle(); tested = OK $result = DllCall("user32.dll", "int", "MessageBox", "hwnd", $Applhandle, "str", "Control Window Active " & $Ctrlhandle, "str", "Handle Test", "int", 0) EndFunc ;==>WinHandle Func CtrlReadLineNum($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEdit_GetLineCount($Ctrlhandle) MsgBox(0, "Test", "Line #" & " " & $Ctrlread) EndFunc ;==>CtrlReadLineNum Func LineIndex($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEdit_LineIndex($Ctrlhandle) MsgBox(0, "Test", "Line Index" & " " & $Ctrlread) EndFunc ;==>LineIndex Func LineLenght($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEdit_LineLength($Ctrlhandle) MsgBox(0, "Test", "Line Lenght" & " " & $Ctrlread) EndFunc ;==>LineLenght Func CtrlRead($Ctrlhandle); tested = OK $LineCount = _GUICtrlEdit_GetLineCount($Ctrlhandle) MsgBox(0, "Test", "Line #" & " " & $LineCount) For $LineNum = 0 To $LineCount - 1 $FirstCharPos = _GUICtrlEdit_LineIndex($Ctrlhandle, $LineNum) MsgBox(0, "Test", "First Char Pos on Line IDX: " & $FirstCharPos) $LineLen = _GUICtrlEdit_LineLength($Ctrlhandle, $FirstCharPos) MsgBox(0, "Test", "Length: " & $LineLen) $Buffer = $LineLen $Ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $Ctrlhandle, "int", $EM_GETLINE, "int", $LineNum, "str", "") MsgBox(0, "Test", "Text is =" & " " & $Ret[4]) Next EndFunc ;==>CtrlRead Link to comment Share on other sites More sharing options...
Stevo Posted May 2, 2009 Share Posted May 2, 2009 (edited) Hi Malkey, Many thanks for sending you script. This one still didn't work. I run Vista SP1. So what I did I copied it to XP Desktop. Then it runs OK. I think this method needs to be changed for it to work on Vista. Kind of running ideas here. Many thanks again. Steven Edited May 2, 2009 by Stevo Link to comment Share on other sites More sharing options...
GaryFrost Posted May 3, 2009 Share Posted May 3, 2009 Using 3.3.0.0 on Vista 32b the following script runs. Don't have a 64b to try on at this time. expandcollapse popup#Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=readData.exe #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** ; My first DLLCall ; ptrex #include <GUIConstants.au3> #include <GuiConstantsEx.au3> #include <GUIedit.au3> ;Opt("WinTitleMatchMode", 4); Allow ClassName lookup ; Global Const $EM_GETLINE = 0xC4 Dim $LineCount Dim $LineNum Dim $Ret Dim $LineLen Dim $FirstCharPos Dim $Buffer Run("notepad") WinActivate("[class:Notepad]", "") WinWaitActive("[class:Notepad]", "") Local $Applhandle = WinGetHandle(""); [class:Notepad]") Local $Ctrlhandle = ControlGetHandle("", "", "Edit1") ConsoleWrite("$Ctrlhandle " & $Ctrlhandle & @CRLF) WinHandle() Local $sFile = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") & "\include\changelog.txt" ; Create GUI _GUICtrlEdit_SetText($Ctrlhandle, FileRead($sFile)) CtrlRead($Ctrlhandle) $str = ControlGetText("", "", "[Class:Edit]") ;MsgBox(0,"Test",$str) Func WinHandle(); tested = OK $result = DllCall("user32.dll", "int", "MessageBox", "hwnd", $Applhandle, "str", "Control Window Active " & $Ctrlhandle, "str", "Handle Test", "int", 0) EndFunc ;==>WinHandle Func CtrlReadLineNum($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEdit_GetLineCount($Ctrlhandle) MsgBox(0, "Test", "Line #" & " " & $Ctrlread) EndFunc ;==>CtrlReadLineNum Func LineIndex($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEdit_LineIndex($Ctrlhandle) MsgBox(0, "Test", "Line Index" & " " & $Ctrlread) EndFunc ;==>LineIndex Func LineLenght($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEdit_LineLength($Ctrlhandle) MsgBox(0, "Test", "Line Lenght" & " " & $Ctrlread) EndFunc ;==>LineLenght Func CtrlRead($Ctrlhandle); tested = OK $LineCount = _GUICtrlEdit_GetLineCount($Ctrlhandle) MsgBox(0, "Test", "Line #" & " " & $LineCount) For $LineNum = 0 To $LineCount - 1 $return = MsgBox(1, "Test", "Text is =" & " " & _GUICtrlEdit_GetLine($Ctrlhandle, $LineNum)) If $return = 2 Then ExitLoop Next EndFunc ;==>CtrlRead SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Stevo Posted May 4, 2009 Share Posted May 4, 2009 (edited) Hi GaryFrost, Thank you very much. That worked OK on Notepad. However when I try to read the text from RichText controls I get "Text is = ?". So just a question mark as the value. My next question is how to read the value of Richtext Control Edits? Many thanks for your kind help. Cheers, Steven Using 3.3.0.0 on Vista 32b the following script runs. Don't have a 64b to try on at this time. expandcollapse popup#Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=readData.exe #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** ; My first DLLCall ; ptrex #include <GUIConstants.au3> #include <GuiConstantsEx.au3> #include <GUIedit.au3> ;Opt("WinTitleMatchMode", 4); Allow ClassName lookup ; Global Const $EM_GETLINE = 0xC4 Dim $LineCount Dim $LineNum Dim $Ret Dim $LineLen Dim $FirstCharPos Dim $Buffer Run("notepad") WinActivate("[class:Notepad]", "") WinWaitActive("[class:Notepad]", "") Local $Applhandle = WinGetHandle(""); [class:Notepad]") Local $Ctrlhandle = ControlGetHandle("", "", "Edit1") ConsoleWrite("$Ctrlhandle " & $Ctrlhandle & @CRLF) WinHandle() Local $sFile = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") & "\include\changelog.txt" ; Create GUI _GUICtrlEdit_SetText($Ctrlhandle, FileRead($sFile)) CtrlRead($Ctrlhandle) $str = ControlGetText("", "", "[Class:Edit]") ;MsgBox(0,"Test",$str) Func WinHandle(); tested = OK $result = DllCall("user32.dll", "int", "MessageBox", "hwnd", $Applhandle, "str", "Control Window Active " & $Ctrlhandle, "str", "Handle Test", "int", 0) EndFunc ;==>WinHandle Func CtrlReadLineNum($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEdit_GetLineCount($Ctrlhandle) MsgBox(0, "Test", "Line #" & " " & $Ctrlread) EndFunc ;==>CtrlReadLineNum Func LineIndex($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEdit_LineIndex($Ctrlhandle) MsgBox(0, "Test", "Line Index" & " " & $Ctrlread) EndFunc ;==>LineIndex Func LineLenght($Ctrlhandle); tested = OK $Ctrlread = _GUICtrlEdit_LineLength($Ctrlhandle) MsgBox(0, "Test", "Line Lenght" & " " & $Ctrlread) EndFunc ;==>LineLenght Func CtrlRead($Ctrlhandle); tested = OK $LineCount = _GUICtrlEdit_GetLineCount($Ctrlhandle) MsgBox(0, "Test", "Line #" & " " & $LineCount) For $LineNum = 0 To $LineCount - 1 $return = MsgBox(1, "Test", "Text is =" & " " & _GUICtrlEdit_GetLine($Ctrlhandle, $LineNum)) If $return = 2 Then ExitLoop Next EndFunc ;==>CtrlRead Edited May 4, 2009 by Stevo Link to comment Share on other sites More sharing options...
GaryFrost Posted May 4, 2009 Share Posted May 4, 2009 http://www.autoitscript.com/forum/index.php?showtopic=79600 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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