So, nun bin ich ein bisschen weiter.
Ich habe nun herausgefunden, wie man den aktuellen Pfad findet, in welchem man im Explorer ist.
Dementsprechend habe ich auch die Funktion NewFolder angepasst.
Doch wie finde ich den UNC Pfad der markierten Datei heraus?
Spoiler anzeigen
Opt("TrayIconHide", 1)
Opt("TrayAutoPause", 0)
HotKeySet("{F7}", "NewFolder") ;F7 Hotkey for creating new folder in Windows Explorer
HotKeySet("{F10}", "UNCPath") ;F10 Hotkey for storing UNC path of the selected file in the clipboard.
While 1
Sleep(10000)
WEnd
Exit
Func NewFolder()
Local $sPath = "", $aInfo, $sDirName = "Neuer Ordner", $iDirExtension = 2, $sDirFullName = ""
$sPath = WinGetText("[CLASS:CabinetWClass]")
$aInfo = StringSplit($sPath, @LF)
If Not IsArray($aInfo) Then Return -1
$sPath = $aInfo[2]
DirGetSize($sPath & "\" & $sDirName)
If @error <> 1 Then ;Directory already exist!
While 1 ;While Directory exist which I want to create....
DirGetSize($sPath & "\" & $sDirName & " (" & $iDirExtension & ")")
If @error <> 1 Then ;Directory already exist!
$iDirExtension += 1 ;Increment Index
Else ;Directory not exist!
$sDirFullName = $sDirName & " (" & $iDirExtension & ")"
DirCreate($sPath & "\" & $sDirFullName) ;Create Directory with index-number
ExitLoop ;Exit While
EndIf
WEnd
Else
$sDirFullName = $sDirName
DirCreate($sPath & "\" & $sDirFullName) ;Create Directory without index-number
EndIf
Send("{F5}") ;Refresh explorer view
Sleep(200)
Send($sDirFullName, 1) ;Select created folder
Send("{F2}") ;Edit name
;~ Send("+{F10}")
;~ Send("n")
;~ Send("o")
EndFunc ;==>NewFolder
Func UNCPath()
Local $sPath, $aInfo
$sPath = WinGetText("[CLASS:CabinetWClass]")
$aInfo = StringSplit($sPath, @LF)
If Not IsArray($aInfo) Then Return -1
$sPath = $aInfo[2]
EndFunc ;==>UNCPath
[/autoit]