Open Everything GUI results with TC LOADLIST

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Open Everything GUI results with TC LOADLIST

Post by *Horst.Epp »

Ovg wrote: 2021-10-16, 16:41 UTC I use AHK v1.1.33.10 - August 29, 2021, but I don't think that is the case
I updated my version to this but it doesn't help as expected.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: Open Everything GUI results with TC LOADLIST

Post by *Ovg »

Horst.Epp wrote: 2021-10-16, 16:25 UTC The first thing I see is that you have a Extension column in Everything which I don't have.
The default column parameters 2,1 mean the path is in Column 2 and the name in column 1.
Thats the default Everything layout.
Bingo! I reproduced behavior described by you and tuska. I'll investigate further. :oops:
Thanks for help!
Last edited by Ovg on 2021-10-16, 18:30 UTC, edited 1 time in total.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Open Everything GUI results with TC LOADLIST

Post by *Horst.Epp »

2tuska
Sorry, but your test cases are not required to test the script.
I not have any strange long pathnames for the tools nor multi line comment columns in Everything.
I test in a very simple and clean environment with a few files.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
tuska
Power Member
Power Member
Posts: 3755
Joined: 2007-05-21, 12:17 UTC

Re: Open Everything GUI results with TC LOADLIST

Post by *tuska »

Horst.Epp wrote: 2021-10-16, 16:51 UTC 2tuska
Sorry, but your test cases are not required to test the script.
I not have any strange long pathnames for the tools nor multi line comment columns in Everything.
Well, but the test cases cannot do any harm.
So far, the script has tolerated my deployed paths well.
The second point is how you would like to read the tooltip for a comment in a Word document,
continuous text or structured.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Open Everything GUI results with TC LOADLIST

Post by *Horst.Epp »

tuska wrote: 2021-10-16, 16:56 UTC The second point is how you would like to read the tooltip for a comment in a Word document,
continuous text or structured.
I never make tool tips which need a structure to be readable.
They are always short and not a replacement for a readme or other documentation.

You see above that I could help Ovg to find the problem :D
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: Open Everything GUI results with TC LOADLIST

Post by *Ovg »

2Horst.Epp

Unfortunatelly no. I change layout and forgot:
Ovg wrote: 2021-10-14, 19:23 UTC While I was rewriting the script, I found out that if you change the order of the columns in EV you will have to write the changes in ini file and then completely exit EV and launch it again so that the script will recognize the change.
After "rebooting" EV for me working again ....
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: Open Everything GUI results with TC LOADLIST

Post by *Ovg »

https://disk.yandex.com/i/CHVGjec7i1k7Cw

The same question: What am I missing? Where may be error in my tests?
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Open Everything GUI results with TC LOADLIST

Post by *Horst.Epp »

Ovg wrote: 2021-10-16, 17:30 UTC https://disk.yandex.com/i/CHVGjec7i1k7Cw

The same question: What am I missing? Where may be error in my tests?
For today I have to stop but may be tomorow I have some time.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
tuska
Power Member
Power Member
Posts: 3755
Joined: 2007-05-21, 12:17 UTC

Re: Open Everything GUI results with TC LOADLIST

Post by *tuska »

2Ovg
In the meantime, I have found the files from the last big test with comments that lead to the following error message.
Original error message

Code: Select all

Datei nicht gefunden! (235x)
      unter Betragsgrenze: kompetenzmäßige Unterschrift
dann v. Gliederungen_Formate_BACKUP.dotx die Formate i.d.
Dokument übertragen.
von oben: 5,5 cm --- OK; keine Leerzeichen lassen zwischen
Empfänger und Adresse !
Vorlage erstellt am:
Backup
...
Comment1
Comment on an Excel template (.xlt)
Data was overwritten because of sensitive info, but the formatting is correct!

Code: Select all

AAAAAAA: xx 123485666 xxx 000000 xxxxxxxx
               bbbbbbbb bbbbbb bbb bbb bbbbbbbbbb-
                xxxxxxx xxxxxxxxxxxx !
               (xxxxxxxxxxxxxxx xxxx xxx x. xxx. xxxx);
          xxxxx xxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Comment2

Code: Select all

Falls es Probleme mit der Formatierung gibt,
dann v. Gliederungen_Formate_BACKUP.dotx die Formate i.d. Dokument übertragen.
Comment3

Code: Select all

Papierfach entleeren (A4-Blätter);
Briefkuvert muß mit Umschlagklappe (oben) und
Umschlagklappe rechts in den normalen Papier
einzug eingelegt werden (nicht in Kuv.Fach !) -
Extras-Briefe-Umschläge-Optionen-Benutzerdefiniert,zB Breite 16,2 cm Höhe 11,4 cm OK;
Empfängeradresse:
von links: AUTO (enspricht idF 7,5 cm)
von oben: 5,5 cm  --- OK; keine Leerzeilen lassen zwischen Empfänger und Adresse !
Comment4

Code: Select all

Dokument erstellt am:
Vorlage erstellt am:
Comment5

Code: Select all

Dokument erstellt am: 11.10.2010 15:36:38
Vorlage erstellt am: 20.03.2006 10:26:46
Comment6

Code: Select all

Dokument erstellt am: 10.02.2015 13:23:19
Vorlage erstellt am: 01.07.2013 08:14:25
I would therefore ask you once again to see if a correction is still possible.
If this is possible, then all my comments will probably have been corrected.

Another advantage would be that the error message might then show a few file names
that were not included in the search result in the TC.
If one of the file names in the error message has a certain file attribute,
it might be easier to clear up the rest of the difference.

If, after that, error messages about comments still appear in search queries, I would suggest that we leave it at that.

Because if it is only about comments (additional lines in the EV-Results.txt),
then TC would not include them in the search result, and despite the error message,
one would have a correct search result.

PS:

Code: Select all

Pcs 235 Differences - Drive N:
--------------------------------------------------------------------------------------
     18 files - The difference in comments is almost negligible (perhaps correctable).
      1 folder in ignore list -> OK
    216 files still unclear (file attributes?)
The further examination [possibly a new test, if there are major changes on drive N:] cannot be done until next week.
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: Open Everything GUI results with TC LOADLIST

Post by *Ovg »

2tuska

I have tried with your comments, but for me works fine....

EV layout: https://disk.yandex.com/i/adfDNUfNhiHy6A - that's right?

How it works - https://disk.yandex.com/i/CHVGjec7i1k7Cw. Mysticism .......

May be Windows version is the case? I use W7 x64.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Open Everything GUI results with TC LOADLIST

Post by *Horst.Epp »

2Ovg
The last good version in this thread for me was this one from 15 Oct 2021 19:19
viewtopic.php?p=406305#p406305
This works flawless in my tests under Windows 11.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: Open Everything GUI results with TC LOADLIST

Post by *Ovg »

2Horst.Epp
Thanks for info. I'll compare versions.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: Open Everything GUI results with TC LOADLIST

Post by *Ovg »

2Horst.Epp
viewtopic.php?p=406305#p406305 - this version skips files and folders if their names consist of only zeros
eg - c:\folder\folder\0 or c:\folder\00 or c:\0 and so on
eg files - 0 or 00 or 00 and so on (without extension)

Please try this one:
Spoiler

Code: Select all

;https://www.ghisler.ch/board/viewtopic.php?t=75439 Open Everything GUI results with TC LOADLIST
;https://www.ghisler.ch/board/viewtopic.php?t=75417 LOADLIST command and UTF8 file lists
;https://www.voidtools.com/forum/viewtopic.php?f=4&t=10594 Send ResultsList to Total Commander
;
; Build AutoHotkey_L
; Build x64
; Build Kill=true
; Build Zip=false
; Build Run=true

#NoEnv
;#Persistent
#SingleInstance Force
SetBatchLines, -1



;#x::
; Create / read .ini file settings
SetTitleMatchMode, RegEx
iniFile := RegExReplace(A_ScriptFullPath, "(ahk|exe)$", "ini")

if not (FileExist(iniFile)) {
    iniContent :="
    ( LTrim
        [General]
        ; Where to save the output (full path)
        DestinationFile=D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\EV-Results\EV-Results.txt

        ; The columns 'Name' and 'Path' must be visible in the Everything
        ; window. The first value is the position of the 'Path', the second
        ; value is the position of the 'Name' column
        ; Default: 2,1
        EverythingColumnPositions=2,1
        AddEndSlash=1
    )"
    FileAppend, % iniContent, % iniFile, UTF-16
}

IniRead, DestinationFile,           % iniFile, General, DestinationFile,           % A_Temp "\~EV-Results.txt"
IniRead, EverythingColumnPositions, % iniFile, General, EverythingColumnPositions, 2`,1
IniRead, AddEndSlash, % iniFile, General, AddEndSlash, 1

DestinationFile           := ResolveEnvVars(DestinationFile)
EverythingColumnPositions := StrReplace(EverythingColumnPositions, " ")

; Force default value if none is given (or path doesn't exist)
SplitPath, DestinationFile, , dstPath
if (DestinationFile = "" || !InStr(FileExist(dstPath), "D")) {
    DestinationFile := "D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\EV-Results\EV-Results.txt"
;   DestinationFile := A_Temp "~EV-Results.txt" ... in an earlier script! ... analogous to line 40 in the current script (modified).
;   DestinationFile := A_Temp "~EV-Results.txt" ... in einem fruheren Skript! ... analog zu Zeile 40 im aktuellen Skript (modifiziert).
}
if (EverythingColumnPositions = "" || !InStr(EverythingColumnPositions, ",")) {
    EverythingColumnPositions := "2,1"
}
;OutputDebug, % "DestinationFile: " DestinationFile

columnArray := StrSplit(EverythingColumnPositions, ",")


;hWnd := WinExist("im).*?Everything ahk_class EVERYTHING")
hWnd := WinExist("ahk_exe Everything(?:\d\d)*\.exe")

if hWnd
{
  ControlGet, winContent, List, , SysListView321, % "ahk_id" hWnd

  if (winContent)
  {
    fullContent := ""
;   Loop over row(s)
    Loop, Parse, winContent, `n
    {
      rowID := A_Index
      path  := ""
      name  := ""
      full  := ""
      Bad := 2
;     Loop over column(s)
      Loop, Parse, A_LoopField, % A_Tab
      {
        colID   := A_Index
        content := A_LoopField
        If (colID > columnArray[1] And colID > columnArray[2])
        {
          Break
        }
        Else
        {
          If (colID = columnArray[1])
          {
            If !RegExMatch(content,"i)^[a-z]:")
            {
              Break
            }
            path := content
            Bad -= 1
            If !RegExMatch(path,"\\$")
            {
              path := path . "\"
            }
          }
          Else if (colID = columnArray[2])
          {
            If content is Space
            {
              Break
            }
            name := content
            Bad -= 1
          }
        }
      }
      If (Bad == 0)
      {
        full        := path . name
        If InStr(FileExist(full), "D")
        {
          if (AddEndSlash == 1)
          {
            if !RegExMatch(full,"\\$")
            {
              full := full . "\"
            }
          }
          Else
          {
            If RegExMatch(full,"\\$")
            {
              full := SubStr(full,1,StrLen(full)-1)
            }
          }
        }
        fullContent .= full "`n"
      }
    }
    fullContent := RegExReplace(fullContent,"\R$","")
    If (FileExist(DestinationFile))
      FileDelete, % DestinationFile

        FileAppend, % fullContent, % DestinationFile, UTF-16
	run "D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\TOTALCMD64.EXE" /O /T /S D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\EV-Results\
;       run "D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\TOTALCMD64.EXE" /O /R=D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\EV-Results\
;       run "C:\Program Files\Total Commander\TotalCmd64.exe" /O /R=g:\System\Temp

        run "C:\Tools\Everything\Everything64.exe" -instance "PRIVATE" -close
;	run "C:\Tools\Everything\Everything64.exe" -close    	--> see also line 151!
    }
    Else
;   Empty search result
    {
      Msgbox, 16,, Search result is Empty, Nothing to do ...
    }
; No Everything window visible
} Else {
    Msgbox, 16, Fatal error, Everything window does not exist!
}
;run "C:\Tools\Everything\Everything64.exe" -close		--> see also line 140!
SetTitleMatchMode, 1
return

; ==================================
; = GOTO: FUNCTIONS - ResolveEnvVars
; ==================================
; http://www.autohotkey.com/board/topic/40115-func-envvars-replace-environment-variables-in-text/#entry310601
ResolveEnvVars(str) {
    if sz := DllCall("ExpandEnvironmentStrings", "uint", &str, "uint", 0, "uint", 0)
    {
        VarSetCapacity(dst, A_IsUnicode ? sz * 2 : sz)
        if DllCall("ExpandEnvironmentStrings", "uint", &str, "str", dst, "uint", sz)
            return dst
    }
    return str
}
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Open Everything GUI results with TC LOADLIST

Post by *Horst.Epp »

2Ovg
This works fine for my tests
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
Ovg
Power Member
Power Member
Posts: 756
Joined: 2014-01-06, 16:26 UTC

Re: Open Everything GUI results with TC LOADLIST

Post by *Ovg »

Thanks!
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
Post Reply