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: Распаковка mime, uue, b64 
Author Message
Tol!k



PostPosted: Wed Oct 13, 2010 19:25    Post subject: :!: Reply with quote

Для работы этого варианта нужно, чтобы ТС умел _распаковывать_ .uue
например, с помощью MhtUnPack.wcx
Code:
' Description: Распаковывает mime, uue, b64 текст
' из буфера обмена в текущую папку
' Requirements: WSH Helper for TC by Volniy
' Based on lev's code (c) 2010

Set TCS = CreateObject("TCSCRIPT.Helper")
Set FSO = CreateObject("Scripting.FileSystemObject")
Const ForReading = 1, ForWriting = 2
TCS.Wait = True

TempFile=TCS.GetSrcPath & "\TextFromClip.tmp.uue"
Set F = fso.CreateTextFile(TempFile, True)
  F.Write TCS.GetTextFromClip
F.Close

TCS.SendCommand "cm_RereadSource"
TCS.SetTextToClip(TempFile)
TCS.SendCommand "cm_LoadSelectionFromClip", True

TCS.SendCommand "cm_UnpackFiles"
TCS.SendKeystroke "{BS}{Enter}"

Set F = fso.GetFile(TempFile)
F.Delete
TCS.SendCommand "cm_RereadSource"

Set TCS = Nothing
Set FSO = Nothing
WScript.Quit
Работает с кириллицей

Last edited by Tol!k on Wed Oct 13, 2010 21:26; edited 1 time in total
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group