PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Find In Files. Search Option  (Read 335 times)

SeaVipe

  • Senior Member
  • ***
  • Posts: 364
  • Windows 10
Find In Files. Search Option
« on: March 28, 2020, 02:37:24 PM »

Hi Paul, Is it possible to include "In Project" the the Find In Files search box?
Logged
Clive Richey
*“You Either Have To Be Part Of The Solution, Or You’re Going To Be Part The Problem.” Eldridge Cleaver.
#StaySafe, Always  Keep A Safe #SocialDistance, #WashYourHands Often and please, #StayHome!

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9287
  • Windows 10
    • PlanetSquires Software
Re: Find In Files. Search Option
« Reply #1 on: March 28, 2020, 04:25:47 PM »

Hi Clive, I will see what I can do. WinFBE shells out to a Windows command to do the find in files in order to simplify the searching. That's why for my projects I put all of the projects files into one folder ( ie. \src ). I will see if I can just specify specific files.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9287
  • Windows 10
    • PlanetSquires Software
Re: Find In Files. Search Option
« Reply #2 on: March 29, 2020, 11:02:19 AM »

Here we go - all done. It also gave me the opportunity to revisit code that I hadn't looked at for a couple of years.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

  • Senior Member
  • ***
  • Posts: 364
  • Windows 10
Re: Find In Files. Search Option
« Reply #3 on: March 29, 2020, 01:49:27 PM »

Thanks, Paul, you've made my day!
Logged
Clive Richey
*“You Either Have To Be Part Of The Solution, Or You’re Going To Be Part The Problem.” Eldridge Cleaver.
#StaySafe, Always  Keep A Safe #SocialDistance, #WashYourHands Often and please, #StayHome!

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9287
  • Windows 10
    • PlanetSquires Software
Re: Find In Files. Search Option
« Reply #4 on: March 30, 2020, 12:46:37 PM »

I've added a couple more options so now you can search:

[ ] Current Document
[ ] All Open Documents
[ ] Current Project
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9287
  • Windows 10
    • PlanetSquires Software
Re: Find In Files. Search Option
« Reply #5 on: March 31, 2020, 11:22:26 AM »

From my tests I found out that the command that I am shelling out to "FindStr" to do all the hard work for searching files... does not support searching Unicode files. Well, WinFBE Form files are Unicode so any code in those files were not being searched. I am working on a better fix for this.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9287
  • Windows 10
    • PlanetSquires Software
Re: Find In Files. Search Option
« Reply #6 on: March 31, 2020, 11:35:05 AM »

...and although the "find" command program does support Unicode, it is pretty limited otherwise. I might look for a public domain program to include with WinFBE or end up writing my own search code.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9287
  • Windows 10
    • PlanetSquires Software
Re: Find In Files. Search Option
« Reply #7 on: March 31, 2020, 11:46:43 AM »

Looks like there are lots of command line greps available. I'll just take some time and find a suitable one.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9287
  • Windows 10
    • PlanetSquires Software
Re: Find In Files. Search Option
« Reply #8 on: April 01, 2020, 08:26:06 AM »

I've settled on writing my own and it has been incredibly easy so far. With the use of Jose's CFindFile and CTextStream classes, this is almost too easy. Once again, if you are not using Jose's WinFBX library in your coding then you are missing out on a HUGE productivity advantage.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9287
  • Windows 10
    • PlanetSquires Software
Re: Find In Files. Search Option
« Reply #9 on: April 01, 2020, 06:02:30 PM »

All finished and works great with ansi and unicode. Entire new code is about 200 lines thanks to Jose's functions. The searching is also very fast and takes into account unicode Form files that have form meta data and code generation at the start of their files (those lines are bypassed when doing the search). This is actually something that I would not have been able to do should I have opted to use an external grep type of program.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer