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: Перемещение\копирование файлов без подтверждения 
Author Message
LonerD



PostPosted: Sat May 13, 2023 15:24    Post subject: Reply with quote

Я себе таким скриптом на AutoHotkeyV1 сделал для копирования и перемещения Тоталом (суть простейшая - вызов окна и автоматическое нажатие кнопки подтверждения):

Code:
; Total Commander DreamLair                        ;
; Script: Copy-move without confirmation           ;
; Required: Total Commander >=10.00                ;
; Script author: LonerD                            ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
; Parameter:                                       ;
;    m or move - move files                        ;
;    any another - copy files                      ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;

#NoEnv
#NoTrayIcon
#SingleInstance ignore
SetKeyDelay, 20, 20

if not ( WinExist("ahk_class TTOTAL_CMD") || WinActive("ahk_class TTOTAL_CMD") )
  ExitApp
WinGet, hw_TTOTAL_CMD, ID, A

CopyMove = %1%
if ( ( CopyMove = "m" ) || ( CopyMove = "move" ) )
  cm := 1005
  else
    cm := 3101

Gosub, SetTC3264
ButtonOK := TC3264 = 32 ? "TButton5" : "Button13"

PostMessage, 0x433, % cm,,, ahk_class TTOTAL_CMD
WinWait, ahk_class TInpComboDlg
Sleep, 20
SendMessage, 0x201,,, % ButtonOK, ahk_class TInpComboDlg
SendMessage, 0x202,,, % ButtonOK, ahk_class TInpComboDlg
ExitApp

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
; Total Commander Architecture (32 or 64 bit)      ;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;
SetTC3264:
if ( A_Is64bitOS = 0 )
  TC3264 := 32
else
{
  WinGet, TCControls, ControlList, % "ahk_id " hw_TTOTAL_CMD
  Loop, Parse, TCControls, `n, `r
  {
    if ( A_LoopField ~= "ListBox(1|2|3)" )
    {
      TC3264 := A_LoopField ~= "TMyListBox(1|2|3)" ? 32 : 64
      break
    }
  }
}
Return
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;

_________________
Windows 11 | TC DreamLair eternal pre-α


Last edited by LonerD on Sat May 13, 2023 23:59; edited 3 times in total
View user's profile Send private message Visit poster's website ICQ Number


Powered by phpBB © 2001, 2005 phpBB Group