Ahh You got me interested, so I put everything together. That is my problem, I get interested in others issues and forget my owns 😞
#AutoIt3Wrapper_UseX64=y
#include <Constants.au3>
#include <File.au3>
ListSelect()
Func ListSelect()
MsgBox($MB_SYSTEMMODAL, "", "You will have 5 sec to choose desktop icons after closing this msgBox")
Sleep(5000)
Local $sSel = ControlListView("[CLASS:Progman]", "", 1, "GetSelected", 1)
Local $aSel = StringSplit($sSel, "|")
_ArrayColInsert($aSel, 1)
For $i = 1 To $aSel[0][0]
$aSel[$i][0] = ControlListView("[CLASS:Progman]", "", 1, "GetText", $aSel[$i][0])
$aSel[$i][1] = SearchPath($aSel[$i][0])
Next
_ArrayDisplay($aSel)
EndFunc ;==>ListSelect
Func SearchPath($sName)
Local $ssfDESKTOPDIRECTORY = 16, $ssfCOMMONDESKTOPDIR = 25
Local $SHCONTF_NONFOLDERS = 0x40
Local $oShellApplication = ObjCreate("Shell.Application")
Local $oShellFolder = $oShellApplication.NameSpace($ssfDESKTOPDIRECTORY)
Local $oShellFolderItems = $oShellFolder.Items()
$oShellFolderItems.Filter($SHCONTF_NONFOLDERS, "*")
For $oShellFolderItem In $oShellFolderItems
If $oShellFolderItem.name = $sName Then Return $oShellFolderItem.path
Next
$oShellFolder = $oShellApplication.NameSpace($ssfCOMMONDESKTOPDIR)
$oShellFolderItems = $oShellFolder.Items()
$oShellFolderItems.Filter($SHCONTF_NONFOLDERS, "*")
For $oShellFolderItem In $oShellFolderItems
If $oShellFolderItem.name = $sName Then Return $oShellFolderItem.path
Next
Return ""
EndFunc ;==>SearchPath