A bit of copy and paste and minimal refactoring should be able to handle this.
The good thing: XY could be a superb program starter (because it's filterable!) as well...
I'd even provide a script for it
I expected that but it was not totally clear from that other post. Better ask twice.Data = What to return for the selected item (if Data is not used, return from Caption instead)
Yes, you will get your thing as well. Flag 2048.zakhar wrote:![]()
Code: Select all
$list = <<<>>>
Audacity||D:\Tools\@Shortcuts\Audacity [Portable].lnk
>>>;
text inputselect("Test: Caption|Data|Icon", $list, <crlf>, 1 + 1024);
I am happy!admin wrote:Yes, you will get your thing as well. Flag 2048.zakhar wrote:![]()
Ok, I can live with that.IMO it's correct to return nothing in this case.
Code: Select all
$list = <<<>>>
7-Zip|7-Zip Selected|:del
>>>;
text inputselect("Test: Caption|Data|Icon", $list, <crlf>, 1 + 1024);
In the meantime I rethought it. What could be the use of returning nothing? Well, I cannot see much there. I will silently change the behavior with the next release. I will update the last change log accordingly already now.highend wrote:Ok, I can live with that.IMO it's correct to return nothing in this case.
Coming...highend wrote:What I'd like to see supported though: XY internal icons...
Code: Select all
end compare(<xyver>, "19.00.0302", "v") == -1, "This script requires at least v19.00.0302, terminating now!";
$sepID = "<sep>";
$sepIcon = ":queue";
$subLocations = <<<>>>
%USERPROFILE%\Desktop\1
%USERPROFILE%\Desktop\2
%USERPROFILE%\Desktop\3
>>>;
$sep = strrepeat("-", 46) . "x";
$listOfLinks = "";
foreach($subLocation, $subLocations, <crlf>, "e") {
if (exists($subLocation) == 2) {
$links = quicksearch(".lnk", $subLocation);
if ($links) { $listOfLinks .= $links . <crlf> . "$sep|$sepID|$sepIcon" . <crlf>; }
}
}
$listOfLinks .= quicksearch(".lnk /n", "%USERPROFILE%\Desktop");
// Build "Caption|Data|Icon"
$listOfLinks = regexreplace($listOfLinks, "^(.+\\)(.*?)(?=\r?\n|$)", "$2|$1$2|$1$2");
// Remove (.exe).lnk in "Caption"
$listOfLinks = regexreplace($listOfLinks, "^(.+?)(\.exe)?\.lnk\|", "$1|");
// Sel + execute item
$selected = inputselect("", $listOfLinks, <crlf>, 1+1024, , 400, 700);
if ($selected == $sepID) { status "No valid entry selected, aborted!", "8B4513", "stop"; end true; }
open $selected;
Code: Select all
$qs1 = quicksearch(".lnk","C:\Users\User\Desktop\1");
$qs2 = quicksearch(".lnk","C:\Users\User\Desktop\2");
$qs3 = quicksearch(".lnk","C:\Users\User\Desktop\3");
$qs4 = quicksearch(".lnk /n","C:\Users\User\Desktop");
$d = "--------------------------------------------x";
$qs1 = "$qs1<crlf>$d<crlf>$qs2<crlf>$d<crlf>$qs3<crlf>$d<crlf>$qs4";
$a = inputselect("","$qs1","<crlf>",1+2048,0,400,700,"",);
if($a == "" || $a == $d){
$a = 0;
}
end $a == 0;
open "$a";