possible replace the checkboxwith radio ? or either to get some msgbox when more than 1 item selected ?
2. when clicking on "Show Slected Item" its omits c:\ from the msgbox,
i'd like to get the full path name.
thanks in advance!
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; General Profile size
vDir1 = c:
vList := ""
excludedFolders := ""
Loop, Files, % vDir1 "\*", D ; folders
{
if A_LoopFileName in %foldersBlacklist%
{
excludedFolders .= """" . A_LoopFileFullPath . """ "
continue
}
vList .= A_LoopFileFullPath . "|"
}
vList := SubStr(vList, 1, -1)
ListProfile := % StrReplace(vList, "`n", "|")
Gui, Default
Gui -MinimizeBox -MaximizeBox
Gui, Add, ListView, x10 y10 h250 w250 Checked, %vDir1%
For each, file in % StrSplit(RTrim(ListProfile, "|"), "|")
LV_Add(,substr(file,4))
Gui, Add, Button, gButoon1_Profile, Show Selected Item
Gui, Add, Button, gButoon3_Profile, Exit
Gui, Show, ,
return
Butoon1_Profile:
Gui,Submit, noHide
names_Profile := ""
Row_Profile := 0
Loop {
Row_Profile := LV_GetNext(Row_Profile, "C") ; Return next Row_C "checked"
; next LV_GetNext will start from this position
If (!Row_Profile) ; No more chekeds
Break ; Break Loop
LV_GetText(name, Row_Profile, 1)
names_Profile .= chr(34) RegExReplace(name,"^.*\\") chr(34) " "
MsgBox, %names_Profile%
}
if names_Profile =
MsgBox, nothing selected
return
Butoon3_Profile:
ExitApp
GuiEscape:
GuiClose:
ExitApp