Page 1 of 4

InFile

Posted: Saturday 6th February 2021 4:12pm
by cogier
InFile

The program searches for text within files.

I wrote this program to help me find code I have already written. One of its uses is as an addition to Steve's 'Little Helper', for example if you wanted a refresher on how you managed to get a TrayIcon to work a year ago, then this will find the code in seconds. It uses 2 'Tasks' to make the program flow nicely and the search is very fast, especially if searching text files. (3,718 Gambas class files searched in less than 2 seconds).

Please feed back any comments or issues.

Image
InFile.tar.gz
(24.04 KiB) Downloaded 288 times

Re: InFile

Posted: Saturday 6th February 2021 5:08pm
by stevedee
cogier wrote: Saturday 6th February 2021 4:12pm ...Please feed back any comments or issues....
Hi Charlie, I can't get this to load properly in the IDE. I think the problem is that there are no files in the .gambas folder.

Can you re-upload?

Re: InFile

Posted: Saturday 6th February 2021 5:39pm
by PJBlack
steve here it works perfectly ...

Re: InFile

Posted: Saturday 6th February 2021 5:45pm
by cogier
I have re-compressed the file anyway so if you have had trouble the link above is now different.

Re: InFile

Posted: Saturday 6th February 2021 5:54pm
by stevedee
OK, 3rd time lucky! Its now OK.

The tar is now almost twice the size.

Thanks Charlie.

Re: InFile

Posted: Saturday 6th February 2021 8:04pm
by BruceSteers
stevedee wrote: Saturday 6th February 2021 5:08pm
cogier wrote: Saturday 6th February 2021 4:12pm ...Please feed back any comments or issues....
Hi Charlie, I can't get this to load properly in the IDE. I think the problem is that there are no files in the .gambas folder.

Can you re-upload?
I think there was a recent change in gambas that no longer makes these files, i think they are made at runtime now so any new gambas project will be missing them.

This should not stop a project loading in the IDE tough.
Sometime I delete my .gambas folder and then load in the IDE and recompile the project to fix a glitch, it just remade the .gambas folder/files, only thing i found the IDE did not like is a missing .project file.

Wishing well.
Bruce

Re: InFile

Posted: Saturday 6th February 2021 8:10pm
by BruceSteers
BruceSteers wrote: Saturday 6th February 2021 8:04pm
stevedee wrote: Saturday 6th February 2021 5:08pm
cogier wrote: Saturday 6th February 2021 4:12pm ...Please feed back any comments or issues....
Hi Charlie, I can't get this to load properly in the IDE. I think the problem is that there are no files in the .gambas folder.

Can you re-upload?
I think there was a recent change in gambas that no longer makes these files, i think they are made at runtime now so any new gambas project will be missing them.

Wishing well.
Bruce
Darn it, this could potentially stop ANY pre-made gambas exe working on an older without recompiling as the binaries will be missing :(

I need to investigate this...

Okay I investigated and found the files DO get made :-\
not sure where i'm getting my odd ideas from lol sorry

Re: InFile

Posted: Sunday 7th February 2021 2:55am
by BruceSteers
Handy App Charlie , I like it :)

I just had to add this to FMain ..
Public Sub ComboBoxSearchText_Activate()

  Object.Raise(ButtonSearch, "Click")
 
End
Just so pressing return launched the search too :)

also after my first try I though some more default options would be good like for example "exclude .gambas files / hidden files / backup files / etc" a little for loop on the resulting string[] after the patern matching was my thought.

Nice though. muchos handy :)
Bruce

Re: InFile

Posted: Sunday 7th February 2021 11:51am
by cogier
Nice code Bruce, thanks. I will add this to InFile.
also after my first try I though some more default options would be good like for example "exclude .gambas files / hidden files / backup files / etc" a little for loop on the resulting string[] after the patern matching was my thought.
I'll look into that. Thanks again for the input.

EDIT
Bruce, in your code above what is the advantage of Object.Raise(ButtonSearch, "Click") compared with ButtonSearch_Click?

Re: InFile

Posted: Sunday 7th February 2021 2:23pm
by BruceSteers
cogier wrote: Sunday 7th February 2021 11:51am Nice code Bruce, thanks. I will add this to InFile.
also after my first try I though some more default options would be good like for example "exclude .gambas files / hidden files / backup files / etc" a little for loop on the resulting string[] after the patern matching was my thought.
I'll look into that. Thanks again for the input.

EDIT
Bruce, in your code above what is the advantage of Object.Raise(ButtonSearch, "Click") compared with ButtonSearch_Click?
It seemed to me to be a more "correct" way.
Usually i would just use ButtonSearch_Click() but i have had issues when running functions from inside a KeyHandler event. I wasn't sure if the Activate was a proper Key event but just played it safe, i figured raising the event properly was a better way :)

:)