Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Autorun 
Author Message
Orion9



PostPosted: Tue Dec 24, 2024 12:48    Post subject: Reply with quote

yahuu wrote:
В настоящее время я реализую это следующим образом. Или есть лучший способ?

Можно использовать объект List, как уже написали выше. Сейчас, наверное, это самый простой и лучший способ, особенное если использовать его свойство Text:

Code:
SetHotkeyAction /K:A /H:F1 SelectedList

Func SelectedList()
   Local aSel = List()
   Local sPath = RequestCopyDataInfo("SP"), j, k = 0
   
   aSel.Text = GetSelectedItems(3, 0)
   
   OutputDebugString("Autorun: Selected=" & aSel.Count)
   For j = 0 To aSel.Count - 1
       OutputDebugString("Autorun: Item[" & j & "]=" & sPath & aSel[j])
       If FileExist(sPath & aSel[j]) Then k += 1
   Next
   ShowHint("Selected: " & aSel.Count & auCRLF & "Processed: " & k)
   Free(aSel)
EndFunc
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group