Code: Select all
<start number>|<every nth number> -> 1|3 (first item and every 3rd afterwards...)
Code: Select all
<start number>|<every nth number> -> 1|3 (first item and every 3rd afterwards...)
What did you try to select exactly (real world example where such a dropdown would be necessary)? I'm just working on an easier way to preselect things so this would help me to get a better understanding.Took me a moment to figure out how to restrict it to extensions only (DOS expression). An additional drop-down option "Extensions only" would spare the repeated typing of "*." but it's no big deal.
You enter a number. E.g. 10What does Match: Random do?
30 items in the current folder and you want to select the first and then every 2nd after it. UseAnd how do I get "every nth item" to work?
Code: Select all
$startValue = gettoken($fn_Pattern, 1, "|");
$stepValue = gettoken($fn_Pattern, 2, "|");
if ($startValue < 1 || $stepValue < 1 || strpos($fn_Pattern, ":") == -1) {
status "You did not enter a valid pattern! Required: <start number>:<every nth number>", "8B4513", "stop"; // saddlebrown
end 1=1;
}
Terrific. That will shift gears and reach new worfklow speeds. Here's a real-world branch view scenario: My Photoshop presets folder harbors more than 1,000 files in 44 subfolders. I want to carry along all my custom brushes "abr" but not any *fabric.asl (styles) or *fabric.pat (patterns) etc.highend wrote:I'm currently working on branch view support.
I don't use it very often, too. But with BFS it can be incredible useful!I haven't used branch view much so I'll stay away from that question
Code: Select all
// Use a temporary pattern so that the original is restored on the next form invocation
// For "Begin with" & "End with"
if (strpos($P_BFS_MatchMethod, "match_begin_with") != -1 || strpos($P_BFS_MatchMethod, "match_end_with") != -1) {
$tmpPattern = "";
foreach($pattern, $P_BFS_Pattern, "::") {
$tmpPattern = $tmpPattern . "^$pattern.*" . "::";
}
$tmpPattern = trim($tmpPattern, "::", "R");
}
Code: Select all
// Use a temporary pattern so that the original is restored on the next form invocation
// Begin with
if (strpos($P_BFS_MatchMethod, "match_begin_with") != -1) {
$tmpPattern = "";
foreach($pattern, $P_BFS_Pattern, "::") {
$tmpPattern = $tmpPattern . "^$pattern.*" . "::";
}
$tmpPattern = trim($tmpPattern, "::", "R");
// End with
} elseif (strpos($P_BFS_MatchMethod, "match_end_with") != -1) {
$tmpPattern = "";
foreach($pattern, $P_BFS_Pattern, "::") {
$tmpPattern = $tmpPattern . ".*?$pattern$" . "::";
}
$tmpPattern = trim($tmpPattern, "::", "R");
}
Which ones exactly?There are some more niggles