Code: Select all
$t = ("<curbase>");
copytext $t;
selpos +1; //currently "sel"
status "$t";
Thanks!
Code: Select all
$t = ("<curbase>");
copytext $t;
selpos +1; //currently "sel"
status "$t";
Thus now when the parser reads:Code: Select all
v9.70.0017 - 2010-11-15 15:18 ! Scripting: Unary operators + and - were not always parsed correctly. Fixed. Now stuff like this works: ::echo 1 + --1; //2 ::echo --(1 * ----2); //2
Code: Select all
selpos +1;Code: Select all
selpos 1;Code: Select all
$t = ("<curbase>");
copytext $t;
sel '+1';
status "$t";Code: Select all
v6.80.0070 - 2008-02-11 22:07
...
+ Scripting commands enhanced:
- new
Added a 4th optional parameter "r":
Syntax: new name, [file|dir], [source], [r]
r = invoke rename mode after creation
So, the new default now is to NOT invoke rename mode.
- selpos (now: sel)
Renamed it to "sel" (selpos still works), and added a new
selection method by pattern, and a new optional argument
"count".
Syntax: sel (position)|("pattern")|a|i|f|, [count=1]
- "pattern": If the argument is quoted the next (below current
position) matching item is selected. Note that it does not wrap
around to the top of the list when the bottom is reached.
Pattern can have wildcards * (0 or more chars), ? (1 char),
and # (1 number). To match the character "#" you have to state
"[#]" in the pattern. It's the same rules as in Find Files.
- count: If any item was selected then "count" items are
selected starting with the first item. If omitted, count
defaults to 1. If set to zero, the sel command can be used to
move the focus in a list with no selections.
Examples:
::sel ""*hi*"", 3
Selects the next file below the current position that
matches "*hi*". If no match is found all selections are
removed. If there is a match, the this item and the next 2
are selected.
::sel +6, 6
Selects six-packs of files one after the other.
::sel +1, 0
Moves the focus to the next position, but does not select.
::sel 12, 0
Moves the focus to position 12 (or o the last if less items
in list), but does not select.