Jump to content

Searching specific content in Text file or AU3


Nine
 Share

Recommended Posts

In the old good days (lol) I made one as well long time ago

😉 

Link to comment
Share on other sites

  • 3 weeks later...

I remembered that Nine did write a script to find content in au3 files, as it's written in his signature :

Tool to search content in au3 files

Today, I needed to search text in 40 files that are not au3 files, so I decided to try his script for the 1st time and see if there was a line to change so it could search in any text file extension. The 1st good surprise was the thread name :

Searching specific content in Text file or AU3

And the useful Filters field (default is *.au3) can be changed directly, for example to *.txt or even * for all files in the folder ( * suited me as my text files hadn't any extension at all after being downloaded by curl )

Everything worked fine and the whole searched sentence was retrieved (I was a bit worried it may retrieve this word OR that word from the search field)

So bravo Nine for this great script, maybe you could amend your signature to match it with the thread title, so it will appear clearly in your signature that the script retrieves text for any kind of text file, not only au3 ?

 

Link to comment
Share on other sites

Global Const $ARRAY_OF_FOLDERS = StringSplit(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1) -1) & "\Include" &  @CR & "C:\YourPath", @CR, 2) ; ["C:\Apps\AutoIt", "C:\Program Files (x86)\AutoIt3\Include"]

.. also ..

$hGUI = GUICreate($GUI_TITLE, 800, 490, 190, 120, $WS_THICKFRAME + $GUI_SS_DEFAULT_GUI)
DllCall('shell32.dll', 'long', 'SetCurrentProcessExplicitAppUserModelID', 'wstr', $GUI_TITLE) ; look at _WinAPI_SetCurrentProcessExplicitAppUserModelID()

This what I did to mine. Thanks for the update :)

Edited by argumentum
better code

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

@argumentum Thanks for the suggestions.  I'll add those in my next release.

I remember now that discussion.  And as TimRude noticed just above you, setting Combine taskbar buttons to Never (in Win10) also solves this issue...

 

Link to comment
Share on other sites

2 minutes ago, Nine said:

Combine taskbar buttons to Never (in Win10)

It also sets the icon to the one on the script. I also added:

; If Not FileGetSize(@DesktopDir & "\Search_AU3s.lnk") Then FileCreateShortcut(@AutoItExe, @DesktopDir & "\Search_AU3s", @TempDir, ' "' & @ScriptFullPath & '" ', "Search AU3 content", "shell32.dll", "", -337)

to have a handy shortcut on the desktop with the same iconic icon.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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