Search within selected folders

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

pj
Gold Member
Gold Member
Posts: 471
Joined: 2006 Jan 26, 14:01
Location: Florida

Re: Search within selected folders

Post by pj »

Well it WORKED last night! But now it doesn't -- :roll:

Whether I select one or several folders, the same message comes up "x2 Search Instance Not Found", and the search dialog opens with the previous search terms and the current (parent) folder in "Look in:".

Have not rebooted since. Closed another scrap window and re-ran. Still the same failure... Restared x2 -- no help.

LocaleSearch.exe, modified ‎December ‎03, ‎2015, ‏‎10:16:40 PM (late in Ireland when you made the fix!)
User Command: >"%X2DIR%\LocaleSearch.exe" $>

AAAHHHHH! -- Found the culprit! With the SAP GUI open -- LocaleSearch fails! BUT --- only when I have 2 session windows open. With only one session open LocaleSearch works fine. :shrug:

The SAP GUI is the interface to the SAP system. As an example, once a session is opened, I access it via Excel VBA or Win VBScript (below), linking to the open session with:

Code: Select all

    If Not IsObject(application) Then
       Set SapGuiAuto  = GetObject("SAPGUI")
       Set application = SapGuiAuto.GetScriptingEngine
    End If
    If Not IsObject(connection) Then
       Set connection = application.Children(0)
    End If
    If Not IsObject(session) Then
       Set session    = connection.Children(0)
    End If
    If IsObject(WScript) Then
       WScript.ConnectObject session,     "on"
       WScript.ConnectObject application, "on"
    End If

Any ideas or suggestions?

------------------------------------
PJ in (lovely) FL
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Search within selected folders

Post by Kilmatead »

Hmm... something is spoofing the _WinWaitChild_32770() function - I've not seen that before. The most distasteful solution would be to just change line 72 to:

$hWin = WinWait("Find files or folders", "", 3)

...which should (theoretically) circumvent the issue altogether. As a rule I don't like to target windows by direct titles in public scripts as they would be (by necessity) English-specific, and that would just be prejudicially silly. However, in this case it may be your simplest choice. :shrug:

It would be nice to know exactly why the _32770 safe-function is failing (the whole point of it is to be super-robust, and the methodology used in it sustains this)... but as I can't recreate the problem, I'm snookered.
pj
Gold Member
Gold Member
Posts: 471
Joined: 2006 Jan 26, 14:01
Location: Florida

Re: Search within selected folders

Post by pj »

Works like a champ even with the maximum of 10 sessions open. :beer:

Sorry this upsets the apple cart for clean parental identification. Maybe a different type of DNA test is needed to answer the "Who's your daddy?" question... :roll:

--------------------------
PJ in (NOT Texas :evil: ) FL
becritical
Member
Member
Posts: 24
Joined: 2016 Aug 12, 16:31

Re: Search within selected folders

Post by becritical »

this is a function that I would also like to have, I find the current solution of control alt c and then control F, etc way too complicated and time-consuming because I have to do this several times a day. I tried the localesearch 4.04 but I am not really sure how it works. How it is supposed to work? Has this function been implemented natively in xplorer2 now? I have version 2.5.0.4 professional x64
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Search within selected folders

Post by Kilmatead »

becritical wrote:I tried the localesearch 4.04 but I am not really sure how it works. How it is supposed to work?
LocaleSearch is used via a user-command (Customise -> User Commands), and is best accessed as a toolbar button. How it works is fully described in this post above. If anything in that post is unclear, please be more specific. :wink:
becritical wrote:Has this function been implemented natively in xplorer2 now?
Nikos has not yet seen the light of the obvious. Someone should drop a larger boulder atop his head. :shrug:
becritical
Member
Member
Posts: 24
Joined: 2016 Aug 12, 16:31

Re: Search within selected folders

Post by becritical »

thank you Klima, I will try that :)

Well, add me to the list of people +1 for this functionality
becritical
Member
Member
Posts: 24
Joined: 2016 Aug 12, 16:31

Re: Search within selected folders

Post by becritical »

Kilmatead wrote:
becritical wrote:I tried the localesearch 4.04 but I am not really sure how it works. How it is supposed to work?
LocaleSearch is used via a user-command (Customise -> User Commands), and is best accessed as a toolbar button. How it works is fully described in this post above. If anything in that post is unclear, please be more specific. :wink:
becritical wrote:Has this function been implemented natively in xplorer2 now?
Nikos has not yet seen the light of the obvious. Someone should drop a larger boulder atop his head. :shrug:
ok brilliant! it works! Thanks! Just one thing though, is there a way for it to retain the search term already typed into the search bar, otherwise I have to retype all the time the same thing :cry:
Or is there a way to have a fixed search term instead of ?* ?
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Search within selected folders

Post by Kilmatead »

Ah, yes, I can see that annoying some people. :D I did it that way just because I like to start searches tabula-rasa, with all fields clear, so I don't end up overlooking that I had last-searched for some "containing text" and then wondering why follow-up searches kept failing despite having no intention of populating the "containing" field for those searches, yet there it was, holding on to my old detritus. Author's prerogative, I guess. :wink:

Try this more unchaste version instead. :D
becritical
Member
Member
Posts: 24
Joined: 2016 Aug 12, 16:31

Re: Search within selected folders

Post by becritical »

you sir, just became my virtual hero, kuods to you! :beer:
Kilmatead wrote:Ah, yes, I can see that annoying some people. :D I did it that way just because I like to start searches tabula-rasa, with all fields clear, so I don't end up overlooking that I had last-searched for some "containing text" and then wondering why follow-up searches kept failing despite having no intention of populating the "containing" field for those searches, yet there it was, holding on to my old detritus. Author's prerogative, I guess. :wink:

Try this more unchaste version instead. :D
pj
Gold Member
Gold Member
Posts: 471
Joined: 2006 Jan 26, 14:01
Location: Florida

Re: Search within selected folders

Post by pj »

Kilmatead wrote: 2016 Aug 14, 14:41 Ah, yes, I can see that annoying some people. :D I did it that way just because I like to start searches tabula-rasa, with all fields clear, so I don't end up overlooking that I had last-searched for some "containing text" and then wondering why follow-up searches kept failing despite having no intention of populating the "containing" field for those searches, yet there it was, holding on to my old detritus. Author's prerogative, I guess. :wink:

Try this more unchaste version instead. :D
This link is dead.

Does anyone have the file and can make it available again? I don't need it myself, I just don't want to lose any of K's works.

Nikos, can you consider creating a place for storing user shared content so the efforts of the user base aren't lost?

---------------------------------
PJ in FL
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Search within selected folders

Post by nikos »

unfortunately it's a bit late for this "backup". I have a few of the most popular tools he made but not this one.
the macro section in the quickstart guide has a sample macro that shows how to search using the selected folders as a scope

Code: Select all

# search in selected folders
# --------------------------
GETFOCUS
# create comma separated list of selected paths
SENDKEY alt+ctrl+C # easy way
COMMAND "find file"
WAITWND
WAIT 1000 # 1 sec, dialog appeared?
input 0 # clipboard
store $3
FINDWND look
SETTEXT $3
# now add search criteria
Post Reply