
Using the Ahk script for "Everything to XYplorer" and reading the resulting XY paper folder file with a LOADLIST button in TC.
The file format is UTF16 LE with Bom.
Of course this works only because I have XY running in the background.
The Ahk script must be changed to write the results directly into a file.
Code: Select all
; Build AutoHotkey_L
; Build x64
; Build Kill=true
; Build Zip=false
; Build Run=true
#NoEnv
#SingleInstance Force
SetBatchLines, -1
SetTitleMatchMode, RegEx
hWnd := WinExist("im) - Everything$ ahk_class EVERYTHING")
if hWnd {
ControlGet, winContent, List, , SysListView321, % "ahk_id" hWnd
if (winContent) {
fullContent := ""
; Get only specific columns, not all!
; Path = 2nd column
; Name = 1st column
getCols := "2,1"
getColsArr := StrSplit(getCols, ",")
; Loop over row(s)
Loop, Parse, winContent, `n
{
rowID := A_Index
path := ""
name := ""
full := ""
; Loop over column(s)
Loop, Parse, A_LoopField, % A_Tab
{
colID := A_Index
content := A_LoopField
if (colID = getColsArr[1]) {
path := content
} else if (colID = getColsArr[2]) {
name := content
}
}
if (path && name) {
full := path "\" name
fullContent .= full "<::>"
} else if (path) {
full := path
fullContent .= full "<::>"
}
}
if (fullContent)
fullContent := SubStr(fullContent, 1, StrLen(fullContent) - StrLen("<::>"))
xyHWnd := WinExist("ahk_class ThunderRT6FormDC")
if (xyHWnd) {
xyQueryScript =
( LTrim Join
::$content = replace("%fullContent%", "<::>", <crlf>);
tab("new");
paperfolder("paper:Everything", $content, , "nl");
)
Send_WM_COPYDATA(xyQueryScript, xyHWnd)
}
}
}
run "C:\Tools\Everything\Everything64.exe" -close
return
; ====================================
; = GOTO: FUNCTIONS - Send_WM_COPYDATA
; ====================================
Send_WM_COPYDATA(message, hWnd) {
size := StrLen(message)
if !(A_IsUnicode) {
VarSetCapacity(data, size * 2, 0)
StrPut(message, &data, size, "UTF-16")
} else {
data := message
}
VarSetCapacity(COPYDATA, A_PtrSize * 3, 0)
NumPut(4194305, COPYDATA, 0, "Ptr")
NumPut(size * 2, COPYDATA, A_PtrSize, "UInt")
NumPut(&data, COPYDATA, A_PtrSize * 2, "Ptr")
result := DllCall("User32.dll\SendMessageW", "Ptr", hWnd, "UInt", 74, "Ptr", 0, "Ptr", ©DATA, "Ptr")
return
}