Hi,
How can i make function _ExplorerGetSelectedItems get selecteds items on the Desktop?
Func _ExplorerGetSelectedItems($sCabinetWClass="[CLASS:CabinetWClass]")
Local $Ret = ""
Local $aIndexes, $sSelected, $sSelected_Path
Local $hSearch, $sCurrentFile
$sSelected_Path = ControlGetText($sCabinetWClass, "", "Edit1")
ConsoleWrite($sSelected_Path&@CRLF)
$aIndexes = StringSplit(ControlListView($sCabinetWClass, "", "SysListView321", "GetSelected", 1), "|")
If $aIndexes[0] = 1 And ($aIndexes[1] == "" Or $aIndexes[1] = 0) Then Return SetError(1, 0, 0)
For $i = 1 To $aIndexes[0]
$sSelected = ControlListView($sCabinetWClass, "", "SysListView321", "GetText", $aIndexes[$i])
$sCurrentFile = StringRegExpReplace($sSelected_Path, "\\+$", "") & "\" & $sSelected
If Not FileExists($sCurrentFile) Then ;Search the extension for file...
$hSearch = FileFindFirstFile($sCurrentFile & ".*")
If $hSearch <> -1 Then
$sSelected = FileFindNextFile($hSearch)
FileClose($hSearch)
EndIf
EndIf
;Check if item is a directory
If StringInStr(FileGetAttrib($sCurrentFile), "D") > 0 Then $sSelected = "*"&$sSelected
$Ret = $Ret&$sSelected&Chr(10)
Sleep(1)
Next
Return $Ret
EndFunc