Download Select.xys At least XY v7.90.0030 is required.
so, earlier today i read a thread from Stefan where he asks for the possibility to select every second line and stuff like that. I was pretty sure it's possible via Scripting and so i got hooked and wrote the following little script.
As of now the following scenarios are possible:
- You can either enter the line number where to start the new selection or use the current selection as starting point.
- You can choose if all of the following items or only every 2nd, 3rd, 4th, ... item will be selected
- You can choose a maximum number of items. E.g.: select every 3rd item for the next 100 items (or go till the end of the list)
- It's possible to create "presets" which can be loaded via nicknames/aliases (Did i mention that i love nicknames ). Therefore you only need to type in "youralias" to load a preset which will for example select every 2nd item in the next 100 items.
For this, an INI file "Select.ini" (to be more exact: [basename of the scriptfile].ini is created in the same directory as the xys file. This ini file will also be used to store the last used values.
Known disadvantages:
- For many items the script needs a little time to go through the list one by one.
- The scrolling position is not preserved.
EDIT: I almost forgot: To save a "preset" you need to edit the INI file and add sections which look like the following:
Code: Select all
[first10]
Index=1
Offset=1
Length=10
The name of the preset can be entered in the first input box ("Line number to start from").
Update 09.01.2009
Code: Select all
/* Select
v0.01.0006 2009.01.09 XY v7.90.0030 CJ v0.01.0002
+ Added changelog view through common-jacky library. To show the changelog
call the script with label '_AutoChangelog'
v0.01.0005 2009.01.06 XY v7.90.0030 CJ v0.01.0001
+ Made sure recursion checker is disabled via 'setting' command
+ Added automatic update support for the script through jacky's XYAU. To
install the script in XYAU call the script with label '_InstallInXYAU'
v0.01.0004 2008.12.01 XY v7.80.0030
! Wrong results when seIecting 'next' 5 files... Fixed.
v0.01.0003 2008.10.26 XY v7.80.0030
! If 0 was entered as index (starting point) the script did nothing. Now 0
is replaced by 1
! The script now stops after x seIected items. Before, the skipped items
were also counted
v0.01.0002 2008.10.26 XY v7.80.0030
! A length of 0 was incorrectly replaced by 1. Now it's replaced by the
total number of items in the list
v0.01.0001 2008.11.25 XY v7.80.0030
+ first release
*/