TERMINAL,
Maza Faka,
Цитата TERMINAL:
можно с перезаписью файлов »
|
Я вспомнил, есть ещё и API методы для копирования с отображением системного диалога...
Вот функции прямо из оф. форума (
ссылка на источник) включая константы и обработчик ошибок (я лишь немного подправил функции):
Код:

#Region consts
Global Const $FOR_MOVE = 0x0001
Global Const $FOR_COPY = 0x0002
Global Const $FOR_DELETE = 0x0003
Global Const $FOR_RENAME = 0x0004
Global Const $FOF_MULTIDESTFILES = 0x0001
Global Const $FOF_CONFIRMMOUSE = 0x0002
Global Const $FOF_SILENT = 0x0004
Global Const $FOF_RENAMEONCOLLISION = 0x0008
Global Const $FOF_NOCONFIRMATION = 0x0010
Global Const $FOF_WANTMAPPINGHANDLE = 0x0020
Global Const $FOF_ALLOWUNDO = 0x0040
Global Const $FOF_FILESONLY = 0x0080
Global Const $FOF_SIMPLEPROGRESS = 0x0100
Global Const $FOF_NOCONFIRMMKDIR = 0x0200
Global Const $FOF_NOERRORUI = 0x0400
Global Const $FOF_NOCOPYSECURITYATTRIBS = 0x0800
Global Const $FOF_NORECURSION = 0x1000
Global Const $FOF_NO_CONNECTED_ELEMENTS = 0x2000
Global Const $FOF_WANTNUKEWARNING = 0x4000
Global Const $FOF_NORECURSEREPARSE = 0x8000
#Endregion consts
Func _CopyWithProgress($sFrom, $sTo, $OPERATION_MODE, $GENERAL_MODE)
; version 1 by SumTingWong on 5/26/2006
; http://www.autoitscript.com/forum/index.php?showtopic=11888
; updated by lod3n on 6/5/2007
Local $SHFILEOPSTRUCT
Local $pFrom
Local $pTo
Local $aDllRet
Local $nError = 0
Local $i
If FileExists($sTo) And StringRight($sFrom, 3) <> "*.*" And StringInStr(FileGetAttrib($sFrom), "D") Then $sFrom &= "\*.*"
$SHFILEOPSTRUCT = DllStructCreate("int;uint;ptr;ptr;uint;int;ptr;ptr")
If @error Then Return "nostruct"
; hwnd
DllStructSetData($SHFILEOPSTRUCT, 1, 0)
; wFunc
DllStructSetData($SHFILEOPSTRUCT, 2, $OPERATION_MODE)
; pFrom
$pFrom = DllStructCreate("char[" & StringLen($sFrom)+2 & "]")
; pFrom will now be null-terminated at StringLen($sFrom)+1
DllStructSetData($pFrom, 1, $sFrom)
For $i = 1 To StringLen($sFrom)+2
If DllStructGetData($pFrom, 1, $i) = 10 Then DllStructSetData($pFrom, 1, 0, $i)
Next
; We need a second null at the end
DllStructSetData($pFrom, 1, 0, StringLen($sFrom)+2)
DllStructSetData($SHFILEOPSTRUCT, 3, DllStructGetPtr($pFrom))
; pTo
$pTo = DllStructCreate("char[" & StringLen($sTo)+2 & "]")
; pTo will now be null-terminated at StringLen($sTo)+1
DllStructSetData($pTo, 1, $sTo)
; We need a second null at the end
DllStructSetData($pTo, 1, 0, StringLen($sTo)+2)
DllStructSetData($SHFILEOPSTRUCT, 4, DllStructGetPtr($pTo))
; fFlags
DllStructSetData($SHFILEOPSTRUCT, 5, $GENERAL_MODE)
; fAnyOperationsAborted
DllStructSetData($SHFILEOPSTRUCT, 6, 0)
; hNameMappings
DllStructSetData($SHFILEOPSTRUCT, 7, 0)
; lpszProgressTitle
DllStructSetData($SHFILEOPSTRUCT, 8, 0)
$aDllRet = DllCall("shell32.dll", "int", "SHFileOperation", "ptr", DllStructGetPtr($SHFILEOPSTRUCT))
$retcode = $aDllRet[0]
$pFrom = 0
$pTo = 0
$SHFILEOPSTRUCT = 0
If $retcode <> 0 Then
ConsoleWrite(hex($retcode) & ": " & SHFileOperationErrDecode($retcode) & @crlf)
SetError($nError)
Return False
EndIf
Return True
EndFunc
Func SHFileOperationErrDecode($errNum)
Switch $errNum
case 113
return "The source and destination files are the same file."
case 114
return "Multiple file paths were specified in the source buffer, but only one destination file path."
case 115
return "Rename operation was specified but the destination path is a different directory. Use the move operation instead."
case 116
return "The source is a root directory, which cannot be moved or renamed."
case 117
return "The operation was cancelled by the user, or silently cancelled if the appropriate flags were supplied to SHFileOperation."
case 118
return "The destination is a subtree of the source."
case 120
return "Security settings denied access to the source."
case 121
return "The source or destination path exceeded or would exceed MAX_PATH."
case 122
return "The operation involved multiple destination paths, which can fail in the case of a move operation."
case 124
return "The path in the source or destination or both was invalid."
case 125
return "The source and destination have the same parent folder."
case 126
return "The destination path is an existing file."
case 128
return "The destination path is an existing folder."
case 129
return "The name of the file exceeds MAX_PATH."
case 130
return "The destination is a read-only CD-ROM, possibly unformatted."
case 131
return "The destination is a read-only DVD, possibly unformatted."
case 132
return "The destination is a writable CD-ROM, possibly unformatted."
case 133
return "The file involved in the operation is too large for the destination media or file system."
case 134
return "The source is a read-only CD-ROM, possibly unformatted."
case 135
return "The source is a read-only DVD, possibly unformatted."
case 136
return "The source is a writable CD-ROM, possibly unformatted."
case 183
return "MAX_PATH was exceeded during the operation."
case 1026, 0000005
return "An unknown error occurred. This is typically due to an invalid path in the source or destination. This error does not occur on Microsoft Windows Vista and later."
case 65536
return "An unspecified error occurred on the destination."
case 65652
return "Destination is a root directory and cannot be renamed."
Case 0000002
return "Confirmation was canceled"
EndSwitch
return "SHFileOperation returned errorcode " & hex($errNum) & ", which is not recognized"
EndFunc
Вот примеры использования:
Код:

;Копирование содержимого папки с подтверждением на перезапись (подавляется диалог о создании папки - константа $FOF_NOCONFIRMMKDIR)
_CopyWithProgress("C:\Source", "C:\Dest", $FOR_COPY, $FOF_NOCONFIRMMKDIR)
;Копирование содержимого папки подавляя подтверждение на перезапись (перезапись без подтверждения)
_CopyWithProgress("C:\Source", "C:\Dest", $FOR_COPY, BitOR($FOF_NOCONFIRMMKDIR, $FOF_NOCONFIRMATION))
;Копирование содержимого папки без рекурсии (файлы только в указанной папке)
_CopyWithProgress("C:\Source\*.*", "C:\Dest", $FOR_COPY, $FOF_NORECURSION)
;Копирование только файлов с возможностью отмены действии (без каталогов)
_CopyWithProgress("C:\Source", "C:\Dest", $FOR_COPY, BitOR($FOF_FILESONLY, $FOF_ALLOWUNDO))
Maza Faka,
Цитата Maza Faka:
где можно найти описание синтаксиса COM - обьектов? »
|
Ну как, в справке вообще то

Если ты про мой пример конкретно, я его с оф. форума стащил, но вообще то это нужно смотреть документацию к тому или инному приложению (в этом случае к Windows

).
SAOPP,
Цитата:
сразу же появляется "плавающая" языковая панель
|
Это видимо такие настройки для этой панели (хотя у себя такого никогда не замечал), посмотри в панели управления её настройки.