Jump to content

Searching specific content in Text file or AU3


Go to solution Solved by Nine,

Recommended Posts

Posted (edited)
  On 4/8/2020 at 1:11 PM, Nine said:

Let me know if you have any suggestion to enhance the tool.

Expand  

why I'm sure i 'm forgetting something :huh2:

Made the example will update it from Here

Note that  you can easily adjust this kind of gui you have with "_GUICtrlTuner_Limitless.au3(needs an update ..)  ():  takes a little practice to get used to handling it though (remove any vars from guicreate lines before running it otherwise the control wont show ..

adding to the top of the gui script to make changes 

;~ #include "_GUICtrlTuner_Limitless.au3"
;~ _EnumGUICtrl(@ScriptFullPath)

 

Edited by Deye
Posted

What was the action you were doing when this happens ?  Never seen that error before.  Unless, I can replicate the error, I will not be able to solve it.  And at the moment, you are the only one that have seen it.  And as you can note, my script doesn't have that line, so it must come from a UDF somewhere.  Do you have an old version of AutoIt ?

Posted

Stress test : Search in a folder with 498 subdirectories (10.198 files in total, with 1.351 .au3 files) ==> NO ERRORS

@Nine BTW : This might be a small but useful extension. Display the number of folders and files searched and the number of matches (and search time ;)). A text below the treeview would be sufficient.

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Posted (edited)

had some time to kill so i have updated _GUICtrlTuner_Limitless.au3 to work with this gui 

Anyways.  here is a PS version to what i have already pointed out here 

The way its done here is that the search isn't restricted to any parameter for instance delete the filter and it will just list any latest files to the top

the only parameter that is restricted is the "years" one set to -1 year back (by default)

  Reveal hidden contents

 

Edited by Deye
Posted

@Deye  Thank you for that suggestion.  I see now what was the intent of your previous post.  But the goal of the script is not to find specific files. Its goal is to search for specific content inside files.  For example, I was also thinking of using RegExp.  However, the RegExp would be applied to text in files not to file names.  It is also important for me that the filter field can support multiple extensions.  When I search for FreeBasic content, I need to search for both .bas and .bi.

Of course I could merge all your features and mine into a single tool, but I need to think about.  Thanks again for taking time to adapt your idea to the script.  Maybe others can share their thoughts ?

Posted (edited)

 

  On 4/20/2020 at 3:43 PM, Nine said:

goal is to search for specific content inside files

Expand  

look again with the "Text to search" field < that allows to do exactly that (search within files)

i'm sure there are more commands that will allow you to search with RegExp

if you had to get all these features using just autoit's keys you would have to put in much more work to update the OP example

This example off course doesnt override the OP example juat another example on how to do it all plus with more features @incorporating  PS

Edited by Deye
  • 3 months later...
Posted

Nice tool.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 4/8/2020 at 1:11 PM, Nine said:

* Allows only 1 running instance of the script

Expand  

It doesn't bother me, but is there any reason running two instances at the same time would be detrimental to ... anything? I generally don't do this in my scripts because I couldn't care less if you have two instances open

(Side note: I like that the date -in the quote- is wrong due to the edits :D)

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

  Reveal hidden contents
Posted
  On 11/23/2020 at 1:12 PM, seadoggie01 said:

I couldn't care less if you have two instances open

Expand  

Sometimes I forget I have this running so I was always creating more and more instances.  After few days I had like 8 instances of it.  I do not see any usage of having more than 1 instance of this tool open.

  On 11/23/2020 at 1:12 PM, seadoggie01 said:

date -in the quote- is wrong

Expand  

:)

  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...