OK, thanks for the explanation.
According to your explanation, the only thing left to hope for in lines 52 and 53 is that a user uses these paths,
if he has NOT made an entry in lines 41 and 42. But maybe I don't understand your explanation.
Moderators: white, Hacker, petermad, Stefan2
OK, thanks for the explanation.
Code: Select all
------------------------------------------------------------------------------------------------------------------------
| | Everything | EV: 1 Instance | EV-window | EV-window | | Hotkeys |
| No. | "Main" | e.g. PRIVATE | OPEN | CLOSED | Parameters | (QAP) |
|=====|============|================|===========|===========|==============================================|===========|
| 1 | X | - | - | X | CloseEverything = 1 (default) *) | |
| | | | | | run %Everything% -close | |
|-----|------------|----------------|-----------|-----------|----------------------------------------------|-----------|
| 2 | X | - | X | - | CloseEverything = 0 | |
| | | | | | run %Everything% -close | |
|=====|============|================|===========|===========|==============================================|===========|
| 3 | - | X | - | X | CloseEverything = 1 (default) *) | |
| | | | | | run %everything% -instance "PRIVATE" -close | |
|-----|------------|----------------|-----------|-----------|----------------------------------------------|-----------|
| 4 | - | X | X | - | CloseEverything = 0 | |
| | | | | | run %everything% -instance "PRIVATE" -close | |
|=====|============|================|===========|===========|==============================================|===========|
------------------------------------------------------------------------------------------------------------------------
| | Everything | EV: 1 Instance | EV-window | EV-window | | Hotkeys |
| No. | "Main" | e.g. PRIVATE | OPEN | CLOSED | Parameters | (QAP) |
|*****|************|****************|***********|***********|**********************************************|***********|
| 5 | X | - | X | | ;CloseEverything = 0 | AltGr + S |
| | | | | X | run %Everything% -instance "PRIVATE" -close | AltGr + D |
|-----|------------|----------------|-----------|-----------|----------------------------------------------|-----------|
| 6 | - | X | X | | ;CloseEverything = 0 | AltGr + D |
| | | | | X | run %Everything% -close | AltGr + S |
|*****|************|****************|***********|***********|**********************************************|***********|
When using Everything (No. 5) AND an Everything - (PRIVATE) instance (No. 6), I have the option,
to leave the Everything window OPEN -OR- CLOSED when transferring a search result to TC!
The use of a button or a system-wide hotkey (QAP) is possible.
I suggest adding the following parameters to the .INI file as well:
Code: Select all
run %Everything% -close
run %Everything% -instance "INSTANCENAME" -close
I will not add a 2nd Everything close commandtuska wrote: ↑2021-10-19, 23:10 UTC I suggest adding the following parameters to the .INI file as well:... because if someone wants to use Everything instances, corresponding changes must be made in the AHK script.Code: Select all
run %Everything% -close run %Everything% -instance "INSTANCENAME" -close
Code: Select all
run %Everything% -close
- OR -
run %Everything% -instance "INSTANCENAME" -close
Code: Select all
Lines 37-42
Lines 52-53
Line 154
Code: Select all
Line 37: DestinationFile = C:\Tools\Wincmd\Scripts\Results\Everything.txt
Line 38: EverythingColumnPositions=2,1
Line 39: AddEndSlash = 1
Line 40: CloseEverything = 1
Line 41: Everything = C:\Tools\Everything\Everything64.exe
Line 42: TotalCmd = C:\Tools\Wincmd\totalcmd64.exe
Line 43: Everything = C:\Tools\Everything\Everything64.exe
;This refers to line 52: IniRead, Everything, % iniFile, General, Everything, "C:\Tools\Everything\Everything64.exe"
Line 44: Everything = C:\Tools\Everything\Everything64.exe
;This refers to line 53: IniRead, TotalCmd, % iniFile, General, TotalCmd, "C:\Tools\Wincmd\totalcmd64.exe"
Line 45: Instance-name = Everything -> default
- OR -
Instance-name = PRIVATE -> if another instance is used, e.g. "Everything - (PRIVATE)"
;This refers to line 154: run %Everything% -close - OR - Line 154: run %Everything% -instance "PRIVATE" -close
Code: Select all
[General]
; DestinationFile
; Where to save the output (full path to DestinationFile.txt)
; EverythingColumnPositions
; The columns 'Name' and 'Path' must be visible in the Everything GUI Window
; The first value is the position of the 'Path' column
; The second value is the position of the 'Name' column (Default: 2,1)
; Should Everything GUI window be closed after transfering to TC
; The contents of the following lines must be adjusted if necessary, e.g. path and parameter adjustments.
;********************************************************************************************************
DestinationFile = C:\Tools\Wincmd\Scripts\Results\Everything.txt
EverythingColumnPositions=2,1
AddEndSlash = 1
CloseEverything = 1
Everything = C:\Tools\Everything\Everything64.exe
Instance = run %Everything% -close
TotalCmd = C:\Tools\Wincmd\totalcmd64.exe
;********************************************************************************************************
Code: Select all
[General]
; DestinationFile
; Where to save the output (full path to DestinationFile.txt)
; EverythingColumnPositions
; The columns 'Name' and 'Path' must be visible in the Everything GUI Window
; The first value is the position of the 'Path' column
; The second value is the position of the 'Name' column (Default: 2,1)
; Should Everything GUI window be closed after transfering to TC
; The contents of the following lines must be adjusted if necessary, e.g. path and parameter adjustments.
;********************************************************************************************************
DestinationFile = C:\Tools\Wincmd\Scripts\Results\Everything.txt
EverythingColumnPositions=2,1
AddEndSlash = 1
CloseEverything = 1
Everything = C:\Tools\Everything\Everything64.exe
Instance = run %everything% -instance "PRIVATE" -close
TotalCmd = C:\Tools\Wincmd\totalcmd64.exe
;********************************************************************************************************
Thats a rather confusing post
Well, that's how you take it.
Code: Select all
;********************************************************************************************************
DestinationFile = D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\EV-Results\EV-Results.txt
EverythingColumnPositions=2,1
AddEndSlash = 1
CloseEverything = 0
UseInstance = Everything
Everything = "C:\Tools\Everything\Everything64.exe"
TotalCmd = "D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\TOTALCMD64.EXE"
IniRead, Everything, % iniFile, General, Everything, "C:\Tools\Everything\Everything64.exe"
IniRead, TotalCmd, % iniFile, General, TotalCmd, "D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\TOTALCMD64.EXE"
run %Everything% -instance "%UseInstance%" -close
;********************************************************************************************************
Code: Select all
;********************************************************************************************************
DestinationFile = D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\EV-Results\EV-Results.txt
EverythingColumnPositions=2,1
AddEndSlash =1
CloseEverything =0
UseInstance =Everything
Everything = C:\Tools\Everything\Everything64.exe
TotalCmd = D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\TOTALCMD64.EXE
;********************************************************************************************************
Code: Select all
;********************************************************************************************************
DestinationFile = D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\EV-Results\EV-Results.txt
EverythingColumnPositions=2,1
AddEndSlash =1
CloseEverything =0
UseInstance =Everything
Everything = C:\Tools\Everything\Everything64.exe
TotalCmd = D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\TOTALCMD64.EXE
;********************************************************************************************************
Code: Select all
[General]
; UseInstace (empty for default instance)
; UseInstance (empty for default instance) <- Proposal
Code: Select all
Usage: Optionaly set the UseInstance and CloseEverything options
Usage: Optionally, the options UseInstance and CloseEverything can be set ... <-- Proposal
Code: Select all
In line no. 41, 45, 46, 47 the field content must NOT be enclosed in inverted commas! *
In line no. 63, 64 ....... the field content (paths) may be enclosed in inverted commas.
Code: Select all
Everything OPENED + Everything - (PRIVATE) started | Search query in Everything: D:\Daten\WINWORD\ --> Result: OK
Code: Select all
Everything started + Everything - (PRIVATE) OPENED | Search query in Everything - (PRIVATE): ..... --> Result: OK
Code: Select all
Everything <only> ......................... OPENED | Search query in Everything: D:\Daten\WINWORD\ --> Result: OK
Code: Select all
Everything - (PRIVATE) <only> ............. OPENED | Search query in Everything - (PRIVATE): ..... --> Result: OK
Indeed, currently not supported...tuska wrote: ↑2021-10-21, 00:58 UTC Test: NOT successful!
Mount network folders as drives
- tsclient= ... Mount network folders as drives
- D:\zTEST\X\ corresponds to \\Tuska-pc\X\
- X\ ... Share folder X only
- After clicking on the drive letter X\ in Total Commander, the following path is displayed in TC: \\Tuska-pc\X\
The tooltip for the button shows \\Tuska-pc\X. File properties shows: X (\\Tuska-pc).
In Windows Explorer the shared folder X is NOT displayed, e.g. under network addresses(!)- Everything: Indexes - Folders -> \\Tuska-pc\X\
- Search query in Everything: \\Tuska-pc\X\
- Result: 2 folders, 4 files (1 file of them hidden -> descript.ion)
- Transfer of search result with "2021-10-20_1810_(26x)_HorstEpp_FirstPost_tuska.exe"
- Result:
- EV-Results.txt ................................. -> EMPTY!
- Search result in TC on tab "Search result:" -> EMPTY!
Code: Select all
If !RegExMatch(content,"i)^[a-z]:|\\\.*?\\")
2tuska
I have changed the script in first post.Ovg wrote: ↑2021-10-21, 05:13 UTC 2tuska
Change line 111 in script from the 1st post toand try againCode: Select all
If !RegExMatch(content,"i)^[a-z]:|\\\.*?\\")
Code: Select all
If !RegExMatch(content,"i)^(?:[a-z]:|\\\.*?\\)")
That works great.Ovg wrote: ↑2021-10-21, 05:13 UTC 2tuska
Change line 111 in script from the 1st post toand try againCode: Select all
If !RegExMatch(content,"i)^[a-z]:|\\\.*?\\")
Code: Select all
Line 3: ; Last modified: 20.10.2021 (Added option UseInstance) .... 21.10.2021: If !RegExMatch(content,"i)^[a-z]:|\\\.*?\\")
Line 41: DestinationFile = D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\EV-Results\EV-Results.txt
Line 42: EverythingColumnPositions=2,1
Line 43: AddEndSlash = 1
Line 44: CloseEverything = 0
Line 45: UseInstance = Everything
Line 46: Everything = C:\Tools\Everything\Everything64.exe
Line 47: TotalCmd = D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\TOTALCMD64.EXE
Line 63: IniRead, Everything, % iniFile, General, Everything, "C:\Tools\Everything\Everything64.exe"
Line 64: IniRead, TotalCmd, % iniFile, General, TotalCmd, "D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\TOTALCMD64.EXE"
Line 111: If !RegExMatch(content,"i)^[a-z]:|\\\.*?\\")
Line 163: Run %TotalCmd% /O /T /S %DestinationDir%
Line 165: run %Everything% -instance "%UseInstance%" -close
Code: Select all
; Transfer Everything GUI results to TC
; Authors: Horst.Epp & Ovg
; Last modified: 20.10.2021 (Added option UseInstance) .... 21.10.2021: If !RegExMatch(content,"i)^[a-z]:|\\\.*?\\")
; 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
; Create / read .ini file settings
SetTitleMatchMode, RegEx
iniFile := RegExReplace(A_ScriptFullPath, "(ahk|exe)$", "ini")
if not (FileExist(iniFile)) {
iniContent :="
(( LTrim
[General]
; DestinationFile
; Where to save the output (full path to DestinationFile.txt)
; EverythingColumnPositions (Default: 2,1)
; The columns 'Name' and 'Path' (must be visible in the Everything GUI)
; The first value is the position of the 'Path' column
; The second value is the position of the 'Name' column
; CloseEverything (Default 1 for yes)
; Should Everything GUI window be closed after transfering results to TC
; UseInstance (empty for default instance)
; Name of the Everything instance to be used for closing the GUI
; The contents of the following lines must be adjusted if necessary, e.g. path and parameter adjustments.
;********************************************************************************************************
DestinationFile = D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\EV-Results\EV-Results.txt
EverythingColumnPositions=2,1
AddEndSlash = 1
CloseEverything = 0
UseInstance = Everything
Everything = C:\Tools\Everything\Everything64.exe
TotalCmd = D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\TOTALCMD64.EXE
;********************************************************************************************************
)"
FileAppend, % iniContent, % iniFile, UTF-16
}
IniRead, DestinationFile, % iniFile, General, DestinationFile, %A_Space%
IniRead, EverythingColumnPositions, % iniFile, General, EverythingColumnPositions, 2`,1
IniRead, AddEndSlash, % iniFile, General, AddEndSlash, 1
IniWrite, %AddEndSlash%, % iniFile, General, AddEndSlash
IniRead, CloseEverything, % iniFile, General, CloseEverything, 1
IniWrite, %CloseEverything%, % iniFile, General, CloseEverything
IniRead, UseInstance, % iniFile, General, UseInstance, %A_Space%
IniWrite, %UseInstance%, % iniFile, General, UseInstance
IniRead, Everything, % iniFile, General, Everything, "C:\Tools\Everything\Everything64.exe"
IniRead, TotalCmd, % iniFile, General, TotalCmd, "D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\TOTALCMD64.EXE"
DestinationFile := ResolveEnvVars(DestinationFile)
EverythingColumnPositions := StrReplace(EverythingColumnPositions, " ")
; Force error if none is given (or path doesn't exist)
SplitPath, DestinationFile, , dstPath
if (DestinationFile = "" || !InStr(FileExist(dstPath), "D")) {
Msgbox, 16, Fatal error, Destination file definition is missing or illegal named !
Return
}
if (EverythingColumnPositions = "" || !InStr(EverythingColumnPositions, ",")) {
EverythingColumnPositions := "2,1"
}
columnArray := StrSplit(EverythingColumnPositions, ",")
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
DestinationDir := SubStr(DestinationFile,1,InStr(DestinationFile, "\",,-1))
Run %TotalCmd% /O /T /S %DestinationDir%
If (CloseEverything == 1) {
run %Everything% -instance "%UseInstance%" -close
}
}
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!
}
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
}
Code: Select all
[General]
; DestinationFile
; Where to save the output (full path to DestinationFile.txt)
; EverythingColumnPositions (Default: 2,1)
; The columns 'Name' and 'Path' (must be visible in the Everything GUI)
; The first value is the position of the 'Path' column
; The second value is the position of the 'Name' column
; CloseEverything (Default 1 for yes)
; Should Everything GUI window be closed after transfering results to TC
; UseInstance (empty for default instance)
; Name of the Everything instance to be used for closing the GUI
; The contents of the following lines must be adjusted if necessary, e.g. path and parameter adjustments.
;********************************************************************************************************
DestinationFile = D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\EV-Results\EV-Results.txt
EverythingColumnPositions=2,1
AddEndSlash =1
CloseEverything =0
UseInstance =Everything
Everything = C:\Tools\Everything\Everything64.exe
TotalCmd = D:\Daten\Programme\TotalCommander\TCD_USB-Stick\TC32-64USB\TOTALCMD64.EXE
;********************************************************************************************************
Code: Select all
\\Tuska-pc\X\Test\
\\Tuska-pc\X\Test1\
\\Tuska-pc\X\descript.ion
\\Tuska-pc\X\File1.JPG
\\Tuska-pc\X\File.doc
\\Tuska-pc\X\File3.jpg
Code: Select all
If !RegExMatch(content,"i)^(?:[a-z]:|\\\.*?\\)")
Thank you - also for the information!