::
Posted: 10 Feb 2008 15:18
Why did I choose "::" as script marker (beginning) and command separator (between commands)? Obviously because I needed a short sequence that was very unlikely to be found anywhere near.
It does the job. But I do not really like it.
It makes the scripts look klingonian in a way.
Why not simply take "; " (semi-colon+blank) instead (as separator, not as marker)!? Okay, it sure is more likely to be found than "::" but up to now it never happened to me. And the scripts would look much more natural to everybody who ever saw a bit of C, Perl, JavaScript, Java, PHP and so on and on.
Compare Now and Then:
Or compare these:
Now: ::step::filter *.png;*.pdf::goto Desktop::focus list::selpos a::backupto Desktop\<dyyyymmdd>::filter
Then: step; filter *.png;*.pdf; goto Desktop; focus list; selpos a; backupto Desktop\<dyyyymmdd>; filter
BTW: The script marker at the beginning is anyway needed only in non-script contexts, i.e. where locations are expected.
It does the job. But I do not really like it.
Why not simply take "; " (semi-colon+blank) instead (as separator, not as marker)!? Okay, it sure is more likely to be found than "::" but up to now it never happened to me. And the scripts would look much more natural to everybody who ever saw a bit of C, Perl, JavaScript, Java, PHP and so on and on.
Compare Now and Then:
Code: Select all
Caption : label
::set $path, <curpath>
::goto Desktop|
::sortby m, d
::selpos 1
// foc list
::#1016
// copy
::#201
::goto $path
"Caption" label;
set $path, <curpath>;
goto Desktop|;
sortby m, d;
selpos 1;
// foc list
#1016;
// copy
#201;
goto $pathNow: ::step::filter *.png;*.pdf::goto Desktop::focus list::selpos a::backupto Desktop\<dyyyymmdd>::filter
Then: step; filter *.png;*.pdf; goto Desktop; focus list; selpos a; backupto Desktop\<dyyyymmdd>; filter
BTW: The script marker at the beginning is anyway needed only in non-script contexts, i.e. where locations are expected.