Nur eine Spielerei (dieses AutoIt-Script benötigt IrfanView, damit werden die Thumbs zur Anzeige im Kopierkonflikt-Aktionsauswahldialog (dieses schöne Wortungeheuer sollte ich mir schützen lassen
Code: Select all
;*** Thumbs4OverwriteConfirmDia.au3, V0.1 von van Dusen
#include <GUIConstants.au3>
AutoItSetOption("WinTitleMatchMode", 4)
AutoItSetOption("WinWaitDelay", 50)
$strTempDir = @TempDir
$strIrfanViewProgPath = "C:\Programme\IrfanView\i_view32.exe"
While 1
WinWait("classname=TExtMsgForm")
;*** cm_CopyFullNamesToClip=2018;Copy names with full path
DllCall("user32.dll", "int", "PostMessage", "hwnd", WinGetHandle("classname=TTOTAL_CMD"), "int", 1075, "int", 2018)
;*** Einträge der Dateiliste aus Clipboard in Feld $strFilelist einlesen
$strFilelist = StringSplit(ClipGet(), @CRLF, 1)
$strFilename = StringTrimLeft($strFilelist[1], StringInStr($strFilelist[1], "\", 0, -1))
;*** Quellverzeichnis und Zeilverzeichnis ermitteln
$strPathnameSource = StringLeft($strFilelist[1], StringInStr($strFilelist[1], "\", 0, -1) - 1)
$strPathnameLeft = ControlGetText("classname=TTOTAL_CMD", "", "TMyPanel5")
$strPathnameLeft = StringLeft($strPathnameLeft, StringInStr($strPathnameLeft, "\", 0, -1) - 1)
$strPathnameRight = ControlGetText("classname=TTOTAL_CMD", "", "TMyPanel9")
$strPathnameRight = StringLeft($strPathnameRight, StringInStr($strPathnameRight, "\", 0, -1) - 1)
If $strPathnameLeft = $strPathnameSource Then
$strPathnameTarget = $strPathnameRight
Else
$strPathnameTarget = $strPathnameLeft
EndIf
;*** Pseudo-Thumbs mit IrfanView erstellen: Quelldatei
FileDelete($strTempDir & "\ThumbSource.bmp")
$strIrfanViewCmd = $strIrfanViewProgPath & " "
$strIrfanViewCmd &= Chr(34) & $strPathnameSource & "\" & $strFilename & Chr(34)
$strIrfanViewCmd &= " /resize=(128,128) /aspectratio /convert="
$strIrfanViewCmd &= Chr(34) & $strTempDir & "\ThumbSource.bmp" & Chr(34)
$strIrfanViewCmd &= " /silent"
RunWait($strIrfanViewCmd, $strTempDir)
If FileExists($strTempDir & "\ThumbSource.bmp") Then
;*** Pseudo-Thumbs mit IrfanView erstellen: Zieldatei
FileDelete($strTempDir & "\ThumbTarget.bmp")
$strIrfanViewCmd = $strIrfanViewProgPath & " "
$strIrfanViewCmd &= Chr(34) & $strPathnameTarget & "\" & $strFilename & Chr(34)
$strIrfanViewCmd &= " /resize=(128,128) /aspectratio /convert="
$strIrfanViewCmd &= Chr(34) & $strTempDir & "\ThumbTarget.bmp" & Chr(34)
$strIrfanViewCmd &= " /silent"
RunWait($strIrfanViewCmd, $strTempDir)
;*** Fensterpostion des Kopierkonflikt-Aktionsauswahldialogs ermitteln
;*** WinGetPos liefert: [0]=x, [1]=y, [2]=Breite, [3]=Höhe
$textmsgformWin = WinGetPos("classname=TExtMsgForm")
$textmsgformWinWidth = $textmsgformWin[2]
;*** WinGetClientSize liefert: [0]=Breite, [1]=Höhe
$textmsgformClient = WinGetClientSize("classname=TExtMsgForm")
;*** Fenster des Kopierkonflikt-Aktionsauswahldialogs vergößern
;*** WinMove-Parameter: Titel, Text, x, y, Breite, Höhe
WinMove("classname=TExtMsgForm", "", $textmsgformWin[0], $textmsgformWin[1], $textmsgformWin[2] + (2*128+32+2*10), $textmsgformWin[3])
;*** Rahmenlosen "integrierten" Zusatzdialog zur Anzeige der Thumbs erstellen und anzeigen
$frmThumbs = GUICreate("Thumbs", 2*132+32, 132, $textmsgformWin[0] + $textmsgformClient[0] + 10, $textmsgformWin[1] + ($textmsgformWin[3] - $textmsgformClient[1]) + 5, $WS_POPUP, $WS_EX_TOPMOST)
GUICtrlCreateLabel("", 0, 0, 132, 132, $SS_SUNKEN)
$picSource = GUICtrlCreatePic($strTempDir & "\ThumbSource.bmp", 2, 2, 0, 0)
$lblArrow = GUICtrlCreateLabel("ð", 133, 48, 30, 32)
GUICtrlSetFont($lblArrow, 24, 400, 0, "Wingdings")
GUICtrlCreateLabel("", 132+32, 0, 132, 132, $SS_SUNKEN)
$picTarget = GUICtrlCreatePic($strTempDir & "\ThumbTarget.bmp", 132+32+2, 2, 0, 0)
GUISetState()
WinActivate("classname=TExtMsgForm")
EndIf
;~ WinWaitClose("classname=TExtMsgForm")
;*** WinWaitClose() ist leider zu langsam
While 1
$textmsgformWin = WinGetPos("classname=TExtMsgForm")
If @error = 1 Or $textmsgformWinWidth = $textmsgformWin[2] Then
ExitLoop
Else
WinMove($frmThumbs, "", $textmsgformWin[0] + $textmsgformClient[0] + 10, $textmsgformWin[1] + ($textmsgformWin[3] - $textmsgformClient[1]) + 5)
EndIf
Sleep(50)
WEnd
If FileExists($strTempDir & "\ThumbSource.bmp") Then GUIDelete($frmThumbs)
Wend