I ended up putting in the script a way to delete the ghost file listing first and then remove the ghost filter (see the script). That way the unghosting process ended quickly.
I made up a quick similar but unrelated script for you to test the ghosting/unghosting process below. To test you need to:
- copy about 200 jpg images to a temp folder
- copy about 100 non-image files to the same folder
- put the folder in a large thumbnail mode
- make that folder the current folder and run the little script below select JPG from the menu.
- note how long it takes to un-ghost the list using the ghost toolbar button.
- if you use the menu item in the script (Ghost Filter Off) to un-ghost, it happens quickly since the ghost edit listing is first deleted before filter removal.
Would it be possible to improve this process? Could you have a flag for SC ghost which could be used to delete any existing ghost filters (i.e., clear the Ghost Filter edit box). Hopefully it could be combined or performed prior to removal of the current ghost filter. Thanks.
Code: Select all
" HIDE IMAGE TYPE|:cfi";
-
" ● JPG";
sub _type;
" ● GIF";
sub _type;
" ● PNG";
sub _type;
-
"Ghost Filter off";
sendkeys '^a{Del}^{Enter}';#499;
ghost(, 0);
end 1;
"_type";
$image_type = substr(caller("caption"),7,,);
if(exists(<curitem>) == 2) {$path = <curitem>;} else {$path = <curpath>;}
$images = quicksearch("* /types=jpg;gif;bmp /n",,"|");
end gettoken($images, "count", "|") < 1, "There are no jpg,gif, or bmp images in this folder.";
$selected = quicksearch("*.$image_type",,"|"); //$selected = quicksearch("* /exclfile=*.$image_type",,"|");
selectitems $selected;
ghost($selected, '1');
XYplorer Beta Club