Hi All,
I'm new to XYplorer and really like it so far I came across this script in Directory Opus for automatically selecting a file when navigating to a folder:
https://resource.dopus.com/t/auto-selec ... ders/20413
I'm not experienced with scripting - can anyone describe how this script can be adapted to work in XYplorer?
Auto-select certain file when entering folder
Re: Auto-select certain file when entering folder
Configuration | General | Custom Event Actions
Even: Changing Locations - After painting the file list
Action: Run script
Script:
To select multiple files, just append them on the right side of a line, separated with "|". Like it is done in:
Even: Changing Locations - After painting the file list
Action: Run script
Script:
Code: Select all
$list = <<<>>>
*\Directory Opus::dopus.exe
*\Outlook::Outlook.pst
C:\Passwords::File4.txt|File2.txt|another file.txt
>>>;
// "[" and "#" need to be surrounded by "[]" for a "LikeI" comparison
foreach($item, $list, <crlf>, "e") {
if (<newpath> LikeI regexreplace(gettoken($item, 1, "::", "t"), "([#\[])", "[$1]")) {
selectitems gettoken($item, 2, "::", "t");
break;
}
}
C:\Passwords::File4.txt|File2.txt|another file.txt
One of my scripts helped you out? Please donate via Paypal
Re: Auto-select certain file when entering folder
Thanks for the code, greatly appreciate it!