InFile

So you have written that new, must have program. Let us see it here.
User avatar
cogier
Site Admin
Posts: 689
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

InFile

Post by cogier » Saturday 06th February 2021 4:12pm

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 47 times

User avatar
stevedee
Posts: 427
Joined: Monday 20th March 2017 6:06pm

Re: InFile

Post by stevedee » Saturday 06th February 2021 5:08pm

cogier wrote:
Saturday 06th 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?

User avatar
PJBlack
Posts: 131
Joined: Tuesday 09th June 2020 10:26pm
Location: Florstadt, Hessen, Germany

Re: InFile

Post by PJBlack » Saturday 06th February 2021 5:39pm

steve here it works perfectly ...

User avatar
cogier
Site Admin
Posts: 689
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: InFile

Post by cogier » Saturday 06th February 2021 5:45pm

I have re-compressed the file anyway so if you have had trouble the link above is now different.

User avatar
stevedee
Posts: 427
Joined: Monday 20th March 2017 6:06pm

Re: InFile

Post by stevedee » Saturday 06th February 2021 5:54pm

OK, 3rd time lucky! Its now OK.

The tar is now almost twice the size.

Thanks Charlie.

User avatar
BruceSteers
Posts: 470
Joined: Thursday 23rd July 2020 5:20pm

Re: InFile

Post by BruceSteers » Saturday 06th February 2021 8:04pm

stevedee wrote:
Saturday 06th February 2021 5:08pm
cogier wrote:
Saturday 06th 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
Wishing well
Bruce

If at first you don't succeed , try it differently.

User avatar
BruceSteers
Posts: 470
Joined: Thursday 23rd July 2020 5:20pm

Re: InFile

Post by BruceSteers » Saturday 06th February 2021 8:10pm

BruceSteers wrote:
Saturday 06th February 2021 8:04pm
stevedee wrote:
Saturday 06th February 2021 5:08pm
cogier wrote:
Saturday 06th 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
Wishing well
Bruce

If at first you don't succeed , try it differently.

User avatar
BruceSteers
Posts: 470
Joined: Thursday 23rd July 2020 5:20pm

Re: InFile

Post by BruceSteers » Sunday 07th February 2021 2:55am

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
Wishing well
Bruce

If at first you don't succeed , try it differently.

User avatar
cogier
Site Admin
Posts: 689
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: InFile

Post by cogier » Sunday 07th 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?

User avatar
BruceSteers
Posts: 470
Joined: Thursday 23rd July 2020 5:20pm

Re: InFile

Post by BruceSteers » Sunday 07th February 2021 2:23pm

cogier wrote:
Sunday 07th 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 :)

:)
Wishing well
Bruce

If at first you don't succeed , try it differently.

Post Reply