gius 0 Posted February 26, 2015 My idea was:search "words" in the file, displaying the string where there is the word, and then open the file,with the help of Melba23 and MikahSthe final code is this: expandcollapse popup#include <File.au3> #include <Array.au3> #include <MsgBoxConstants.au3> #include <GUIConstants.au3> #include <GUIlistview.au3> #include <FontConstants.au3> #include <WinAPI.au3> GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Global $listView Global $folders[2] = [@DesktopDir, @MyDocumentsDir] Global $aResult[100000][2], $n = 0 Local $sFilter = "*.doc;*.txt" ; Create a string with the correct format for multiple filters Local $word = GUICtrlCreateInput("", 464, 24, 129, 37) $Form1 = GUICreate(" ", 623, 438, 192, 124, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX,$WS_TABSTOP)) GUISetFont(18, 600, 0, "MS Sans Serif") ; Set the font for all controls in one call $Label1 = GUICtrlCreateLabel("Search:", 16, 24, 422, 41) ì GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $input = GUICtrlCreateInput("", 364, 24, 129, 37) ; $input is the ControlID of the input control GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $input ; When {ENTER} pressed in input $word = GUICtrlRead($input) ; Read the content of the input GUIDelete($Form1) ; Delete GUI SplashTextOn("", "...", 200, 200, -1, -1, 4, "", 24) ExitLoop EndSwitch WEnd For $k = 0 To UBound($folders) - 1 ; loop through folders $aFiles = _FileListToArrayRec($folders[$k], "*" & $sFilter, 1, 1, 0, 2) ; list files If Not @error Then For $i = 1 To $aFiles[0] ; loop through files $content = FileRead($aFiles[$i]) ; the following regex captures the full lines containing $word $res = StringRegExp($content, '(?im)(.*\b\Q' & $word & '\E\b.*)\R?', 3) ; if $word must be a lone word ; $res = StringRegExp($content, '(?im)(.*\Q' & $word & '\E.*)\R?', 3) ; if $word can be part of another word If IsArray($res) Then $aResult[$n][0] = $aFiles[$i] ; file path For $j = 0 To UBound($res) - 1 $aResult[$n + $j][1] = $res[$j] ; lines Next $n += $j EndIf Next EndIf Next ReDim $aResult[$n][2] aGUI($aResult) SplashOff() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func aGUI($array, $title = "") Local $gui, $i, $findStrPos, _ $itemText, $replacedText, _ $leftStr ;$gui = GUICreate($title, 1024, 768, 192, 124) $gui = GUICreate($title, 800, 640, 192, 124, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX,$WS_TABSTOP)) $Label1 = GUICtrlCreateLabel("", 100, 0, 400, 35, $SS_CENTER ) GUICtrlSetFont(-1, 16, 400, 4, 'Comic Sans Ms') $listView = _GUICtrlListView_Create($gui, "file", 20, 35, @DesktopWidth - 20, @DesktopHeight -120, BitOR($LVS_REPORT, $LVS_SINGLESEL)) $hFont1 = _WinAPI_CreateFont(25, 6, 0, 0, $FW_MEDIUM, False, False, False, _ $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $PROOF_QUALITY, $DEFAULT_PITCH, 'Tahoma') ; <<<<<<<<<<<<<<<< make our own font using WinAPI _WinAPI_SetFont($listView, $hFont1, True) ; <<<<<<<<<<<<<<<<<<<<<<<<<<< Here we set the font for the $listview items $header = HWnd(_GUICtrlListView_GetHeader($listView)) ; <<<<<<<<<<<<<<<< Here we get the header handle _WinAPI_SetFont($header, $hFont1, True) ; <<<<<<<<<<<<<<<<<<< Here we set the header font _GUICtrlListView_SetExtendedListViewStyle($listView, $LVS_EX_GRIDLINES) _GUICtrlListView_AddColumn($listView, "Text") _GUICtrlListView_AddColumn($listView, "") _GUICtrlListView_AddArray($listView, $array) For $i = 0 To UBound($array) - 1 Step 1 $itemText = _GUICtrlListView_GetItemText($listView, $i) If $itemText <> "" Then $findStrPos = StringInStr($itemText, "\", 0, -1) $leftStr = StringLeft($itemText, $findStrPos) $replacedText = StringReplace($itemText, $leftStr, "") _GUICtrlListView_SetItemText($listView, $i, $replacedText) EndIf Next _GUICtrlListView_SetColumnWidth($listView, 0, $LVSCW_AUTOSIZE_USEHEADER) _GUICtrlListView_SetColumnWidth($listView, 1, $LVSCW_AUTOSIZE_USEHEADER) GUISetState(@SW_SHOW) EndFunc ;==>aGUI Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, _ $sIndices, $sData, $sAdata, $file, $splitFile $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $listView Switch $iCode Case $NM_DBLCLK $sIndices = _GUICtrlListView_GetSelectedIndices($listView) $sData = _GUICtrlListView_GetItemText($listView, $sIndices) $sAdata = _ArraySearch($aResult, $sData, Default, Default, Default, 3) $file = _ArrayToString($aResult, Default, $sAdata, 0, Default) $splitFile = StringSplit($file, "|") ShellExecute($splitFile[1]) EndSwitch EndSwitch EndFunc The problem is that they are "read" files: .doc .txt .html but are not "read" important files as .xls .ppt .pdf .rtfIt is possible to improve this code?Or, in the Forum exists an example of Omga4000 that reads any file'?do=embed' frameborder='0' data-embedContent>>it is also possible to receive in the file Log.txt the string with the search word?thank you Share this post Link to post Share on other sites
orbs 201 Posted February 26, 2015 (edited) the link you provided is based on findstr which is also limited to text files. use xdoc2txt (google it) to extract text and then feed the text to your AutoIt script. EDIT: here is a WinMerge plugin that is based on xdoc2txt, you can use it independently. this is an older version though, look for the newer one from the author site (Japanese, but manageable) Edited February 26, 2015 by orbs 1 mLipok reacted to this Share this post Link to post Share on other sites
gius 0 Posted February 26, 2015 Thanks orbs for the reply.Can you explain how to insertamb_xdocdiffPlugin.dllin the folders autoit? thank you Share this post Link to post Share on other sites
mLipok 1,004 Posted February 26, 2015 (edited) http://ebstudio.info/home/xdoc2txt.html http://ebstudio.info/download/KWICFinder/xd2tx207.zip Local $obj = ObjCreate("xd2txcom.Xdoc2txt.1") Local $sfileText = $obj.ExtractText("sample.doc",False) MsgBox(0,'',$sfileText) Awesome mLipok EDIT: REMARKS: Here is Commercial Licence http://ebstudio.info/home/commercial/xdoc2txt.html Edited February 26, 2015 by mlipok Signature beginning: Wondering who uses AutoIt and what it can be used for ?* GHAPI UDF - modest beginning - communication with GitHub REST API * Forum Rules *Include Dependency Tree (Tool for analyzing script relations)ADO.au3 UDF POP3.au3 UDF XML.au3 UDF How to use IE.au3 UDF with AutoIt v3.3.14.x for other useful stuff click the following button Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) *PDF Related: * How to get reference to PDF object embeded in IE * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2021-01-03 Share this post Link to post Share on other sites
orbs 201 Posted February 26, 2015 Can you explain how to insert amb_xdocdiffPlugin.dll in the folders autoit? sorry, but i'm using the command-line tool, not the DLL. Share this post Link to post Share on other sites
mLipok 1,004 Posted February 26, 2015 @gius try my example from post #4 mLipok Signature beginning: Wondering who uses AutoIt and what it can be used for ?* GHAPI UDF - modest beginning - communication with GitHub REST API * Forum Rules *Include Dependency Tree (Tool for analyzing script relations)ADO.au3 UDF POP3.au3 UDF XML.au3 UDF How to use IE.au3 UDF with AutoIt v3.3.14.x for other useful stuff click the following button Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) *PDF Related: * How to get reference to PDF object embeded in IE * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2021-01-03 Share this post Link to post Share on other sites
gius 0 Posted February 26, 2015 I tried your code mlipokI have this error Variable must be of type "Object".: Local $sfileText = $obj.ExtractText("sample.doc",False) Local $sfileText = $obj^ ERROR Share this post Link to post Share on other sites
mLipok 1,004 Posted February 26, 2015 use regsvr32.exe for example in my Windows System: c:WindowsSystem32regsvr32.exe "z:TOOLsActiveX Components__TEXT_EXTRACTIONxd2tx207comxd2txcom.dll" Signature beginning: Wondering who uses AutoIt and what it can be used for ?* GHAPI UDF - modest beginning - communication with GitHub REST API * Forum Rules *Include Dependency Tree (Tool for analyzing script relations)ADO.au3 UDF POP3.au3 UDF XML.au3 UDF How to use IE.au3 UDF with AutoIt v3.3.14.x for other useful stuff click the following button Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) *PDF Related: * How to get reference to PDF object embeded in IE * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2021-01-03 Share this post Link to post Share on other sites
gius 0 Posted February 26, 2015 Thanks mlipok,today I learned how to insert file .dll in the system,thank you! Your code works fine.I can ask how I can change my code? Thanks Share this post Link to post Share on other sites
mLipok 1,004 Posted February 26, 2015 1. You can edit OP and Tidy your code. 2. Be more specyfic. Signature beginning: Wondering who uses AutoIt and what it can be used for ?* GHAPI UDF - modest beginning - communication with GitHub REST API * Forum Rules *Include Dependency Tree (Tool for analyzing script relations)ADO.au3 UDF POP3.au3 UDF XML.au3 UDF How to use IE.au3 UDF with AutoIt v3.3.14.x for other useful stuff click the following button Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) *PDF Related: * How to get reference to PDF object embeded in IE * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2021-01-03 Share this post Link to post Share on other sites
gius 0 Posted February 26, 2015 In this code, how can I insert the possibility to read files with xd2txcom.dll? expandcollapse popup#include <File.au3> #include <Array.au3> #include <MsgBoxConstants.au3> #include <GUIConstants.au3> #include <GUIlistview.au3> #include <FontConstants.au3> #include <WinAPI.au3> GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Global $listView Global $folders[2] = [@DesktopDir, @MyDocumentsDir] Global $aResult[100000][2], $n = 0 Local $obj = ObjCreate("xd2txcom.Xdoc2txt.1") Local $sFilter = "*.doc;*.txt;*.pdf;*xls" ; Create a string with the correct format for multiple filters Local $word = GUICtrlCreateInput("", 464, 24, 129, 37) $Form1 = GUICreate(" ", 623, 438, 192, 124, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX,$WS_TABSTOP)) GUISetFont(18, 600, 0, "MS Sans Serif") ; Set the font for all controls in one call $Label1 = GUICtrlCreateLabel("Search:", 16, 24, 422, 41) ì GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $input = GUICtrlCreateInput("", 364, 24, 129, 37) ; $input is the ControlID of the input control GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $input ; When {ENTER} pressed in input $word = GUICtrlRead($input) ; Read the content of the input GUIDelete($Form1) ; Delete GUI SplashTextOn("", "...", 200, 200, -1, -1, 4, "", 24) ExitLoop EndSwitch WEnd For $k = 0 To UBound($folders) - 1 ; loop through folders $aFiles = _FileListToArrayRec($folders[$k], "*" & $sFilter, 1, 1, 0, 2) ; list files If Not @error Then For $i = 1 To $aFiles[0] ; loop through files $content = FileRead($aFiles[$i]) ; the following regex captures the full lines containing $word $res = StringRegExp($content, '(?im)(.*\b\Q' & $word & '\E\b.*)\R?', 3) ; if $word must be a lone word ; $res = StringRegExp($content, '(?im)(.*\Q' & $word & '\E.*)\R?', 3) ; if $word can be part of another word If IsArray($res) Then $aResult[$n][0] = $aFiles[$i] ; file path For $j = 0 To UBound($res) - 1 $aResult[$n + $j][1] = $res[$j] ; lines Next $n += $j EndIf Next EndIf Next ReDim $aResult[$n][2] aGUI($aResult) SplashOff() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func aGUI($array, $title = "") Local $gui, $i, $findStrPos, _ $itemText, $replacedText, _ $leftStr ;$gui = GUICreate($title, 1024, 768, 192, 124) $gui = GUICreate($title, 800, 640, 192, 124, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX,$WS_TABSTOP)) $Label1 = GUICtrlCreateLabel("", 100, 0, 400, 35, $SS_CENTER ) GUICtrlSetFont(-1, 16, 400, 4, 'Comic Sans Ms') $listView = _GUICtrlListView_Create($gui, "file", 20, 35, @DesktopWidth - 20, @DesktopHeight -120, BitOR($LVS_REPORT, $LVS_SINGLESEL)) $hFont1 = _WinAPI_CreateFont(25, 6, 0, 0, $FW_MEDIUM, False, False, False, _ $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $PROOF_QUALITY, $DEFAULT_PITCH, 'Tahoma') ; <<<<<<<<<<<<<<<< make our own font using WinAPI _WinAPI_SetFont($listView, $hFont1, True) ; <<<<<<<<<<<<<<<<<<<<<<<<<<< Here we set the font for the $listview items $header = HWnd(_GUICtrlListView_GetHeader($listView)) ; <<<<<<<<<<<<<<<< Here we get the header handle _WinAPI_SetFont($header, $hFont1, True) ; <<<<<<<<<<<<<<<<<<< Here we set the header font _GUICtrlListView_SetExtendedListViewStyle($listView, $LVS_EX_GRIDLINES) _GUICtrlListView_AddColumn($listView, "Text") _GUICtrlListView_AddColumn($listView, "") _GUICtrlListView_AddArray($listView, $array) For $i = 0 To UBound($array) - 1 Step 1 $itemText = _GUICtrlListView_GetItemText($listView, $i) If $itemText <> "" Then $findStrPos = StringInStr($itemText, "\", 0, -1) $leftStr = StringLeft($itemText, $findStrPos) $replacedText = StringReplace($itemText, $leftStr, "") _GUICtrlListView_SetItemText($listView, $i, $replacedText) EndIf Next _GUICtrlListView_SetColumnWidth($listView, 0, $LVSCW_AUTOSIZE_USEHEADER) _GUICtrlListView_SetColumnWidth($listView, 1, $LVSCW_AUTOSIZE_USEHEADER) GUISetState(@SW_SHOW) EndFunc ;==>aGUI Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, _ $sIndices, $sData, $sAdata, $file, $splitFile $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $listView Switch $iCode Case $NM_DBLCLK $sIndices = _GUICtrlListView_GetSelectedIndices($listView) $sData = _GUICtrlListView_GetItemText($listView, $sIndices) $sAdata = _ArraySearch($aResult, $sData, Default, Default, Default, 3) $file = _ArrayToString($aResult, Default, $sAdata, 0, Default) $splitFile = StringSplit($file, "|") ShellExecute($splitFile[1]) EndSwitch EndSwitch EndFunc Share this post Link to post Share on other sites
mLipok 1,004 Posted February 26, 2015 (edited) this is code with using TIDY (CTRL+T in SciTe4AutoIt) expandcollapse popup#include <File.au3> #include <Array.au3> #include <MsgBoxConstants.au3> #include <GUIConstants.au3> #include <GUIlistview.au3> #include <FontConstants.au3> #include <WinAPI.au3> GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Global $listView Global $folders[2] = [@DesktopDir, @MyDocumentsDir] Global $aResult[100000][2], $n = 0 Local $obj = ObjCreate("xd2txcom.Xdoc2txt.1") Local $sFilter = "*.doc;*.txt;*.pdf;*xls" ; Create a string with the correct format for multiple filters Local $word = GUICtrlCreateInput("", 464, 24, 129, 37) $Form1 = GUICreate(" ", 623, 438, 192, 124, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_TABSTOP)) GUISetFont(18, 600, 0, "MS Sans Serif") ; Set the font for all controls in one call $Label1 = GUICtrlCreateLabel("Search:", 16, 24, 422, 41) i GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $input = GUICtrlCreateInput("", 364, 24, 129, 37) ; $input is the ControlID of the input control GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $input ; When {ENTER} pressed in input $word = GUICtrlRead($input) ; Read the content of the input GUIDelete($Form1) ; Delete GUI SplashTextOn("", "...", 200, 200, -1, -1, 4, "", 24) ExitLoop EndSwitch WEnd For $k = 0 To UBound($folders) - 1 ; loop through folders $aFiles = _FileListToArrayRec($folders[$k], "*" & $sFilter, 1, 1, 0, 2) ; list files If Not @error Then For $i = 1 To $aFiles[0] ; loop through files $content = FileRead($aFiles[$i]) ; the following regex captures the full lines containing $word $res = StringRegExp($content, '(?im)(.*\b\Q' & $word & '\E\b.*)\R?', 3) ; if $word must be a lone word ; $res = StringRegExp($content, '(?im)(.*\Q' & $word & '\E.*)\R?', 3) ; if $word can be part of another word If IsArray($res) Then $aResult[$n][0] = $aFiles[$i] ; file path For $j = 0 To UBound($res) - 1 $aResult[$n + $j][1] = $res[$j] ; lines Next $n += $j EndIf Next EndIf Next ReDim $aResult[$n][2] aGUI($aResult) SplashOff() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func aGUI($array, $title = "") Local $gui, $i, $findStrPos, _ $itemText, $replacedText, _ $leftStr ;$gui = GUICreate($title, 1024, 768, 192, 124) $gui = GUICreate($title, 800, 640, 192, 124, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_TABSTOP)) $Label1 = GUICtrlCreateLabel("", 100, 0, 400, 35, $SS_CENTER) GUICtrlSetFont(-1, 16, 400, 4, 'Comic Sans Ms') $listView = _GUICtrlListView_Create($gui, "file", 20, 35, @DesktopWidth - 20, @DesktopHeight - 120, BitOR($LVS_REPORT, $LVS_SINGLESEL)) $hFont1 = _WinAPI_CreateFont(25, 6, 0, 0, $FW_MEDIUM, False, False, False, _ $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $PROOF_QUALITY, $DEFAULT_PITCH, 'Tahoma') ; <<<<<<<<<<<<<<<< make our own font using WinAPI _WinAPI_SetFont($listView, $hFont1, True) ; <<<<<<<<<<<<<<<<<<<<<<<<<<< Here we set the font for the $listview items $header = HWnd(_GUICtrlListView_GetHeader($listView)) ; <<<<<<<<<<<<<<<< Here we get the header handle _WinAPI_SetFont($header, $hFont1, True) ; <<<<<<<<<<<<<<<<<<< Here we set the header font _GUICtrlListView_SetExtendedListViewStyle($listView, $LVS_EX_GRIDLINES) _GUICtrlListView_AddColumn($listView, "Text") _GUICtrlListView_AddColumn($listView, "") _GUICtrlListView_AddArray($listView, $array) For $i = 0 To UBound($array) - 1 Step 1 $itemText = _GUICtrlListView_GetItemText($listView, $i) If $itemText <> "" Then $findStrPos = StringInStr($itemText, "\", 0, -1) $leftStr = StringLeft($itemText, $findStrPos) $replacedText = StringReplace($itemText, $leftStr, "") _GUICtrlListView_SetItemText($listView, $i, $replacedText) EndIf Next _GUICtrlListView_SetColumnWidth($listView, 0, $LVSCW_AUTOSIZE_USEHEADER) _GUICtrlListView_SetColumnWidth($listView, 1, $LVSCW_AUTOSIZE_USEHEADER) GUISetState(@SW_SHOW) EndFunc ;==>aGUI Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, _ $sIndices, $sData, $sAdata, $file, $splitFile $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $listView Switch $iCode Case $NM_DBLCLK $sIndices = _GUICtrlListView_GetSelectedIndices($listView) $sData = _GUICtrlListView_GetItemText($listView, $sIndices) $sAdata = _ArraySearch($aResult, $sData, Default, Default, Default, 3) $file = _ArrayToString($aResult, Default, $sAdata, 0, Default) $splitFile = StringSplit($file, "|") ShellExecute($splitFile[1]) EndSwitch EndSwitch EndFunc ;==>WM_NOTIFY Now anybody can easily see what you need. Edited February 26, 2015 by mlipok Signature beginning: Wondering who uses AutoIt and what it can be used for ?* GHAPI UDF - modest beginning - communication with GitHub REST API * Forum Rules *Include Dependency Tree (Tool for analyzing script relations)ADO.au3 UDF POP3.au3 UDF XML.au3 UDF How to use IE.au3 UDF with AutoIt v3.3.14.x for other useful stuff click the following button Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) *PDF Related: * How to get reference to PDF object embeded in IE * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2021-01-03 Share this post Link to post Share on other sites
mLipok 1,004 Posted February 26, 2015 You can try to change this: $content = FileRead($aFiles[$i]) like this: If StringRight($aFiles[$i],4) = '.doc' Then $content = $obj.ExtractText($aFiles[$i], False) Else $content = FileRead($aFiles[$i]) EndIf Signature beginning: Wondering who uses AutoIt and what it can be used for ?* GHAPI UDF - modest beginning - communication with GitHub REST API * Forum Rules *Include Dependency Tree (Tool for analyzing script relations)ADO.au3 UDF POP3.au3 UDF XML.au3 UDF How to use IE.au3 UDF with AutoIt v3.3.14.x for other useful stuff click the following button Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) *PDF Related: * How to get reference to PDF object embeded in IE * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2021-01-03 Share this post Link to post Share on other sites
mLipok 1,004 Posted February 26, 2015 (edited) Since I know a litle about using DllCall, I wanted to try and learn something new. Can somebody show me the way: Here is C++ example // Sample3.cpp : R“\[‹ AvŠP[V‡“‚ĚG“gŠ |C“g‚đ’č‹`‚µ‚Ü‚·B // #include "stdafx.h" #include "OleAuto.h" #include "comutil.h" #include <io.h> #include <fcntl.h> typedef int (*FUNCTYPE)(BSTR lpFilePath, bool bProp, BSTR*lpFileText); int _tmain(int argc, _TCHAR* argv[]) { HINSTANCE hInstDLL; /* DLL‚ĚC“X^“Xn“h‹ */ FUNCTYPE ExtractText; /* DLL‚ĚŠÖ”‚Ö‚Ě|C“^ */ if((hInstDLL=LoadLibrary( _T("xd2txlib.dll") ) ) == NULL ) { abort(); } ExtractText = (FUNCTYPE)GetProcAddress(hInstDLL,"ExtractText"); if( ExtractText != NULL ) { BSTR fileText = ::SysAllocString( _T("") ); int nFileLength = ExtractText( _T("sample.doc"), false, &fileText ); BYTE BOM[2] = {0xff, 0xfe}; _setmode( _fileno( stdout ), _O_BINARY ); fwrite( BOM, 2, 1, stdout ); fwrite( (LPCTSTR)fileText, nFileLength, 1, stdout ); } return 0; } and my AU3 attempts: MsgBox(0, '_xdoc2txt() Result:', _xdoc2txt(@ScriptDir & "\sample.doc")) Func _xdoc2txt($sFileName) Local $sfileText = '' Local $fileLength = DllCall("xd2txlib.dll", "int", 'ExtractText', "str", $sFileName, 'BOOL', False, 'str', $sfileText) MsgBox(0, '@error', @error) MsgBox(0, '', VarGetType($fileLength)) MsgBox(0, '', $sfileText) Return $sfileText EndFunc ;==>_xdoc2txt and I see I'am doing something wrong, as I get this: !>15:06:11 AutoIt3.exe ended.rc:-1073741783 Can I get some help in DllCall ? Edited February 26, 2015 by mlipok Signature beginning: Wondering who uses AutoIt and what it can be used for ?* GHAPI UDF - modest beginning - communication with GitHub REST API * Forum Rules *Include Dependency Tree (Tool for analyzing script relations)ADO.au3 UDF POP3.au3 UDF XML.au3 UDF How to use IE.au3 UDF with AutoIt v3.3.14.x for other useful stuff click the following button Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) *PDF Related: * How to get reference to PDF object embeded in IE * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2021-01-03 Share this post Link to post Share on other sites
gius 0 Posted February 26, 2015 Mlipok, Your code works fine!Even if I am not expert in the code, your examples were really clear.I do not know if it's a problem of my PC,but do not work file.odt, .docx, .xlsx, .pptxis a problem only for me? thanks Share this post Link to post Share on other sites
gius 0 Posted February 26, 2015 Mlipok, Your code # post13, you work with files.odt .pptx .docx .xlsx? thanks Share this post Link to post Share on other sites
mLipok 1,004 Posted February 26, 2015 I do not check it. Signature beginning: Wondering who uses AutoIt and what it can be used for ?* GHAPI UDF - modest beginning - communication with GitHub REST API * Forum Rules *Include Dependency Tree (Tool for analyzing script relations)ADO.au3 UDF POP3.au3 UDF XML.au3 UDF How to use IE.au3 UDF with AutoIt v3.3.14.x for other useful stuff click the following button Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) *PDF Related: * How to get reference to PDF object embeded in IE * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2021-01-03 Share this post Link to post Share on other sites
Melba23 3,411 Posted February 26, 2015 gius,docx, .xlsx, .pptx files are actually zipped containers of the real files used by the app. Yu may need to expand them to get at the internal files before looking for the text. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Share this post Link to post Share on other sites
gius 0 Posted February 26, 2015 Thanks Melba23, can you help me in the code? thanks Share this post Link to post Share on other sites
Melba23 3,411 Posted February 26, 2015 gius,This thread would be a good place to start your research. Come back if you run into difficulties. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Share this post Link to post Share on other sites