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: Script Request 
Author Message
Flasher



PostPosted: Wed Aug 17, 2011 01:11    Post subject: Reply with quote

Code:
' Выделение  в панелях одноимённых, но разноразмерных файлов и папок
' Необходима регистрация Script Helper ActiveX for TC
' Параметр: "%P" "%T"
'==================================================
With CreateObject("Scripting.FileSystemObject")
  Set P = .GetFolder(WScript.Arguments(0))
  Set T = .GetFolder(WScript.Arguments(1))
End With
Set D = CreateObject("Scripting.Dictionary")
Set G = CreateObject("Scripting.Dictionary")

For Each F in P.SubFolders
  D.Add F.Name, F.Size
Next
For Each F in T.SubFolders
  G.Add F.Name, F.Size
Next
For Each F in D.Keys
  If G.Exists(F) And D(F) <> G(F) Then S = S & vbnewline & F & "\"
Next
D.RemoveAll
G.RemoveAll

For Each F in P.Files
  D.Add F.Name, F.Size
Next
For Each F in T.Files
  G.Add F.Name, F.Size
Next
For Each F in D.Keys
  If G.Exists(F) And D(F) <> G(F) Then S = S & vbnewline & F
Next

With CreateObject("TCScript.Helper")
  T = .GetTextFromClip
  .SetTextToClip(S)
  .LockTC True
  .SendCommand 4001
  .SendCommand 2033
  .SendCommand 4002
  .SendCommand 2033
  .LockTC False
  .SetTextToClip(T)
End With

Wscript.Quit
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group