- * Scripting commands enhanced:
- SelPos
New Syntax: selpos ["+"|"-"]position|"a"|"i"|"f", [count=1]
count: number of items to select, starting with position
if missing defaults to 1
if position is a, i, or f, count is ignored
New Examples:
::selpos 1, 3
= select 3 items starting with pos 1
::selpos +3, 3
= select next 3 items
- Set
Now allows having the argument separator (by default a comma
+ blank) in the value. This gives you an easier way to
supply arguments containing the argument separator without
having to reset it using the "sep" command.
New Examples:
::set ;, ,::copytext a; a
= sets ";" to "," and copies "a, a" to the clipboard
::set well, well, well, well::copytext well
= sets "well" to "well, well, well" and copies
"well, well, well" to the clipboard
- LoadScriptFile
Action: Load a file with scripts and pop up a menu made from
those scripts, or execute one of the scripts in the file
directly.
Syntax: loadscriptfile scriptfile, [# script to run]
- scriptfile: required, can be relative to app path.
If the given file is not found then XY will look for
"file.xys", so if you call your script files *.xys
you can skip adding the extension in the loadscriptfile
statement.
- # script to run: optional, will directly run the script
of that number (first script = 1) without popping a menu.
If no script of that number exists, the menu is popped.
Note that separators and other non-script items do NOT
count, so script #2 is the 2nd script, not necessarily
the 2nd menu item.
Examples:
::loadscriptfile RegExp-Both
= loads RegExp-Both.xys if it exists and RegExp-Both doesn't.
::loadscriptfile testscripts.txt
= popup a menu based on testscripts.txt
::loadscriptfile testscripts.txt, 2
= run the 2nd script found in testscripts.txt - * SC (Scripting Command) "set": now, any general XY variables found in the value are resolved.
Resolved variables:
<curpath>
<curfolder>
<d...> (current date)
<m....> (modified date of current list item)
<curext> (of current list item)
<curbase> (of current list item)
<curtitle> (of current list item)
<curver> (of current list item)
Examples:
::set $path, <curpath>::copytext $path
= copies the current path to the clipboard
::set $x, <dyyyy-mm-dd>::copytext $x
= copies the current date to the clipboard
::set $x, <ddddd>::copytext $x
= copies the current weekday to the clipboard - * Script files: now, there is NO blank inserted between appended lines. Solves a problem, and gives you more control.
Thursday, January 31, 2008
v6.80.0052 - 2008-01-31 10:26
Entry Type: Beta Update Posted by XYplorer user : J_C_Hallgren at 4:28 AM