- Selections can be saved with an optional label.
- Selections can be saved with path, such selections are applicable only while that path is open.
- Selections can alternatively be saved with item names only. Such selections are applicable anywhere.
- The load menu lists selections applicable to current location, plus names-only selections. Labelled selections are listed first.
- The manager menu allows for deletion, manual editing and relabelling of selections.
- Just download the script and run it.
- Running the script without arguments shows the main script menu. So you can simply attach the script to a catalog or UDC item just as:
Code: Select all
::load '<xyscripts>\selections.xys';
- Four "public" subscripts are provided: savename, savepath, load, manage.
These can be used to access specific individual functionality as needed, such as for use with custom buttons. Here's a demo CTB snippet that saves selection on left-click and lists loadable selections on right-click:
[/size]Code: Select all
Snip: CTB 1 XYplorer 18.50.0300, 12/8/2017 5:00:11 PM Action NewUserButton Name Selections Icon gentleface\round_checkmark.ico ScriptL load "selections"; ScriptR load "selections", 'load'; FireClick 0
- One configurable permanent variable is created:$P_SELECTIONS_INI, which points to the script's configuration file. (<xydata>\Selections\Selections.ini by default.) Selections are saved at the same location as this ini.
In other words, all selections and configuration are saved inside <xydata>\Selections by default.
- Saving as Names-only selection is recommended.
- Path selections are saved with absolute paths. In fact, the path is taken from tab('get', 'term') so relative and variable paths are possible, but these selections will only be active with the exact same tab term.
- The code is a mess. You have been
warnednotified.
Happy selections! Don't forget to report bugs!