petermad wrote: 2025-03-20, 03:25 UTC
- how would anyone know that you are addressing sniper0 and not Horst.Epp?
And the answer, in your opinion, is whose, if not Horst.Epp's?
Solution with the latest
Autorun beta:
autorun.cfg:
Code: Select all
LoadLibrary Plugins\Autorun_Runtime.dll
RegisterCommand 76543 SelectItemsByBaseNames
RegisterCommand 76544 SelectItemsByBaseNames 1
RegisterCommand 76545 SelectItemsByBaseNames 0 1
RegisterCommand 76546 SelectItemsByBaseNames 1 1
RegisterCommand 76547 SelectItemsByBaseNames 0 2
RegisterCommand 76548 SelectItemsByBaseNames 1 2
Func SelectItemsByBaseNames(lParam, sPanel=0, Type=0)
Local sCount = RequestInfo(11005), tCount = RequestInfo(11001 + sPanel)
If (RequestInfo(11009) And Not RequestInfo(11007) And Not sCount) Or Not tCount Then Return
Local FIdx1 = RequestInfo(11011 + sPanel)
If Type = 1 And FIdx1 = -1 Then Return
Local sList = List(), bList = Map(), i, Name, DotPos, BaseName, cList
sList.Text = sCount ? GetSelectedItems(3) : GetCurrentItem()
bList.CaseSense = False
For i = 0 To sList.Count - 1
Name = sList[i]
DotPos = StrPos(Name, '.', -1)
BaseName = DotPos ? StrLeft(Name, DotPos - 1) : Name
If Not bList.Has(BaseName) Then bList.Set(BaseName)
Next
Free(sList)
Local LoopStart = (Type = 1 ? FIdx1 : (RequestInfo(11009 + sPanel) ? 1 : 0)), _
LoopEnd = (FIdx1 = -1 ? tCount : RequestInfo(11001 + sPanel + (Type = 2 ? 10 : 0)))
If LoopStart > tCount Then Return
For i = LoopStart To LoopEnd - 1
Name = StrPart(SendMessage(RequestInfo(3 + sPanel), 0x0189, i, 0, 2), auTAB, 1)
DotPos = StrPos(Name, '.', -1)
BaseName = DotPos ? StrLeft(Name, DotPos - 1) : Name
If bList.Has(BaseName) Then
If FIdx1 = -1 Or i < FIdx1 Then Name &= '\'
cList &= Name & auLF
EndIf
Next
If cList <> '' Then
ClipGet Clip
ClipPut(cList)
If sPanel Then SendCommand(4006, 0, 1)
SendCommand(2033, 0, 1)
If sPanel Then SendCommand(4006)
ClipPut(Clip)
EndIf
Free(bList)
EndFunc
Totalcmd.inc:
cm_RightViewMode9=8259;etc. until 8499
cm_SelectItemsByBaseNames=76543
cm_SelectItemsByBaseNamesT=76544; T - select in the target panel
cm_SelectFilesByBaseNames=76545
cm_SelectFilesByBaseNamesT=76546
cm_SelectFoldersByBaseNames=76547
cm_SelectFoldersByBaseNamesT=76548
I suppose everything is clear from the command names.