Tuesday, September 30, 2008

v7.60.0037 - 2008-09-30 15:30

  • ! DropDown: Error on closing app if no items in Name / Location MRU list. Fixed.

v7.60.0036 - 2008-09-30 12:15

  • + DropDown: Now implemented on Find Files Name & Location tab.
  • + DropDown: Icon in Edit box now honours ScriptSmartDetect. Actually the ScriptSmartDetect tweak is now honoured everywhere where quick scripting works. So you can e.g. add a Catalog entry with "location":
      echo "smart script";
    If ScriptSmartDetect=1 then you will see the correct script icon and the script will run on a single click.
  • + DropDown: Some special service keys now also work with the Edit box of the new DropDown:
      Ctrl+A: Select All.
      F2:     If all is selected: unselect all, move caret to end
              of text. Else: select all.
  • ! DropDown: List did not wheel. Fixed.
  • ! DropDown: Fixed a couple of other glitches.
  • ! Homezoned tabs were overwritten by permanent startup path. Fixed.
  • ! Scripting: Did not work as expected:
      msg <date dd-mm-yyyy>; //30-09-2008
  • ! Scripting: Did not work as expected:
      msg (1 == 1) ? ('$a is a variable') : 'uh?'; //$a is a variable
  • * Menu Go: Made some captions a bit more consistent and hopefully newbie-friendlier by means of redundancy:
      "Go to Application Path"
      "Go to Application Data"
      "Go to Script Files"
      "Go to Application Folder"
      "Go to Application Data Folder"
      "Go to Scripts Folder"

Sunday, September 28, 2008

v7.60.0034 - 2008-09-28 08:39

  • ! Some lists crashed on opening the Rename box. Fixed.
  • ! DropDown: List does not wheel. Not fixed yet...

Saturday, September 27, 2008

v7.60.0032 - 2008-09-27 20:26

  • +++ New DropDown Control.
    - supports Unicode
    - supports Auto-Complete path/file names
    - supports Auto-Complete recently used items
    - supports TABbing through the items
    - F4, Up, Down: all open the list; F4 closes again; next Up or Down select list items; selection wraps around ends
    - shows icons for edit box and list items (where applicable)
    - list supports mouse wheel
    - edit box ignores mouse wheel (that's good!)
    - is not a so-called UserControl (that's very good!) and not made of MS parts but fully hand-made, and hence incredibly powerful and enhanceable, extremely fast and low in memory consumption Test the new control e.g. in the Go To dialog (Ctrl+G). Later it will be added to various places of the app. and will eventually replace the current Address Bar.
    + Configuration: Added option "Auto-optimize tree". Check to automatically collapse non-current nodes in Tree. Rule: Auto-optimize sets in when you expand the current tree node.
    ! SC setkey: Now supports creating UNICODE files. Your existing INI files will work as before but newly created ones will be in UTF-16 and thus support double byte characters sets.
    ! SC compare(): Buggy when they were a different number of digits at each slot. Fixed.
      ::echo compare("1.3", "1.12", "v"); // 1 (30 > 12)
      ::echo compare("1.0.0002", "1.0.001", "v"); // -1 (2 < 10)
    + SC confirm() enhanced:
      Name:   confirm
      Syntax: confirm(text, [linebreaker])
        ::echo confirm("Should#I#stay#or#should#I#go#?", "#");

Tuesday, September 23, 2008

v7.60.0026 - 2008-09-23 13:11

  • %%% Tabs: Now the List updates much smoother on tab change. Browsing to particular files (not just folders) also got much smoother. There are no limits to optimization...
  • + Scripting got a new function.
      Name:   Compare
      Action: Compare two strings.
      Syntax: compare(string1, string2, [method=b])
        method: b = [default] binary, bytes: strings are compared
                i = same as b, but case-insensitive: A=a
                n = numeric: strings are converted to numbers (fractions
                    use dot) and then compared numerically
                v = version: compares file versions of formats like
                    #.## or #.##.#### or #.##.##.##
        return: -1 if string1 < string2
                 0 if string1 == string2
                 1 1 if string1 > string2
        ::echo compare("a", "b"); // -1
        ::echo compare("a", "A"); // 1
        ::echo compare("a", "A", "i");  // 0
        ::echo compare("2", "12", "b"); // 1
        ::echo compare("2", "12", "n"); // -1
        ::echo compare("10.20.0025", "7.60.0026", "b"); // -1
        ::echo compare("10.20.0025", "7.60.0026", "v"); // 1

Monday, September 22, 2008

v7.60.0025 - 2008-09-22 22:00

  • %%% Tree and File List snappier due to new strategy in icon retrieval, and a couple of other inspired moments.
  • * Menu View | Current Tab | Views: Redefined the View selection logic. Now each view item is a toggle between the view in question and Details view. Hence the item "Toggle Details/Thumbnails #1" could be removed (use "Thumbnails #1" instead).
  • + Toolbar: Added button "List View". Toggles between List View and Details View.
  • + Toolbar: Redesigned buttons for "Toggle Details/Thumbnails #1" and "Views".
    Note that you will have to re-add the "Toggle Details/Thumbnails #1" button to your toolbar because of a necessary internal change.
  • * Menu Scripting | Try Script...: Now the step mode is enabled even before the window is opened to give you a better visual feedback.
  • ! Scripting: Spaces were trimmed before line-end comments. Not a good idea. Fixed.
  • ! Scripting: Variables list was buggy. Fixed.
  • ! List View: Internal state was set only after the painting was completed. Now it's set before. This should fix some issues where the internal state was out- of-synch.

Sunday, September 21, 2008

v7.60.0022 - 2008-09-21 21:48

  • + Tweak: Getting tired of typing "::" into the Address Bar when debugging script lines I added this little tweak:
    Whenever the Address Bar content matches this:
      (not a full path) AND (has ; anywhere) AND
      (1st char != ?) AND (1st char != )
    it is interpreted as script, not as location. This allows Quick Searches like ?gif;png and Visual Filters like gif;png, and recognizes scripts even with line-end comments, like:
      echo ("0" > "")?"True":"False"; //True
    Works for me.
    + Scripting got a new function.
      Name:   Eval
      Action: Evaluate an expression.
      Syntax: eval(expression)
      - $a = "1 + 1";
        echo $a;       //1 + 1
        echo eval($a); //2
      - $a = '<xypath>';
        echo $a;       //<xypath>
        echo eval($a); //C:\Progs\XYplorer
      - // Little calculator
        input $math, "Paste your math:", "1+1";
        echo "The result is: " . eval($math);
  • - Scripting: removed SC "try". Reason: superfluous.
  • * Menu Scripting | Try Script...: Now step mode is always auto-enabled (if not enabled anyway) when you run a script from the Try window. The previous state is restored when done.
  • ! Scripting: Would not parse ::msg"Hi!" correctly. Fixed.
  • ! Scripting: Would forget to reenable stepmode after finishing a script under certain cnditions. Fixed.

Saturday, September 20, 2008

v7.60.0019 - 2008-09-20 16:01

  • * Scripting: You now can assign fractions without quoting them.
      ::$a = 1.2; echo $a * 0.5; //0.6
      ::echo 1.2 + 2.1;          //3.3
    Note that you have to collaborate with the parser a little. If you do the following, the result might not meet your expectations:
      ::$a = 0.5; echo $a.2;    //0.5.2
    The NEW rule: A dot directly followed by a digit is not interpreted as a concatenator but as a decimal separator. A blank after the dot will make the difference here, and quotes play their role, too:
      ::$a = 0.5; echo $a. 2;   //0.52
      ::$a = 0.5; echo "$a.2";  //0.5.2
      ::$a = 0.5; echo "$a. 2"; //0.5. 2
    So, for what it's worth, you now can "append" fractions to integers like this:
      ::$a = 1; $b = $a.2; echo $b * 2; //2.4
  • ! Scripting: Fixed a couple of glitches in math and comparison.

v7.60.0018 - 2008-09-20 13:27

  • +++ Scripting now can do basic calculation using math operators +-*/. Fractions and parentheses are supported.
      ::echo 1 + 1;
      ::echo 1 - 2 - 3; // -4
      ::echo 1 - (2 - 3); // 2
      ::echo 1/3 + 1/3;
      ::echo 1 + 2 * 3;
      ::echo (1 + 2) * 3;
      ::echo 1/0; // error division by zero
      ::$a=3; $b=2; echo $a / $b; // 1.5
      ::$fraction = "1.5"; echo $fraction == 3/2; // true
      ::echo "1.2" + "2.1"; // 3.3
    - Strings are converted to numbers as possible (just like in
        ::$a=""; $b="2"; echo $a + $b; // = 2
        ::$a="1a"; $b="2b"; echo $a + $b; // = 3
    - The decimal separator is NOT locale specific (e.g. dot in US,
      comma in Germany) but hard-coded to dot. This way scripts are
      interchangeable between regions.
    - To define fractional numbers you have to quote them:
        ::$fraction = "1.5"; echo $fraction / 2; // 0.75 (1.5/2)
        ::$fraction = 1.5; echo $fraction / 2; // 7.5 (15/2)
    - Calculation uses 8-byte floating point numbers with the
      following ranges:
        negative: -1.79769313486232E308  to -4.94065645841247E-324
        positive:  4.94065645841247E-324 to  1.79769313486232E308
      Floating point arithmetic has its natural shortcomings so don't
      expect too much in terms of precise accuracy down to the 12th
      digit. A file manager is not a scientific calculator.
  • ! Scripting: Comparison did not honour fractions. Fixed. This works now as expected:
    ::echo "10.3" > "2.2"; //true
  • + Scripting got a new command.
      Name: Echo
      Action: Show simple message box.
      Syntax: echo text
        ::echo "hi!";
        ::echo ;
      Remarks: It's the smaller brother of msg. Added mainly for
        copy+paste compatibility with PHP code.
  • ! Scripting: Nesting ternaries did not work as expected:
      ::msg (1==1)?((2==2)?"yes":"no"):"error"; //should be "yes"
  • ! Scripting: Nesting comparisons did not work as expected:
      ::msg (1==1) == (2==2); //should be 1 (True)
  • ! Scripting: Numerical comparison was invoked if any of the operands was numerical. Wrong: _both_ operands need to be numerical! Fixed.
      ::echo ("0" > "");    //true  (1)
      ::echo ("0" > "0");   //false (0) (numeric)
      ::echo ("0" > "00");  //false (0) (numeric)
      ::echo ("0" == "00"); //true  (1) (numeric)
      ::echo ("0" == "")";  //false (0)
      ::echo ("a" == "")";  //false (0)
      ::echo ("a" == "0")"; //false (0)
      ::echo (0 == "");     //false (0)
      ::$foo=0; echo ($foo == ""); //false (0)
  • ! Scripting: Would ignore functions when one or more blanks were between function name and opening parenthesis. Fixed. Now you can do this:
      ::msg quote               ("pluto");
  • ! Scripting: Setting variables using equal-operator would convert the variables to lower case internally. Fixed: Case is preserved now, and this works as expected:
      ::$myText = "Howdy!"; echo $myText;
  • ! SC "load": In a passed list of script labels any blanks were not trimmed. Fixed.

Friday, September 19, 2008

v7.60.0017 - 2008-09-19 09:09

  • + Scripting got a new function.
      Note: The command getinfo is converted into a function! Since
      it was introduced after the last official release it's still
      considered BETA so there's no compatibility code. IOW: You have
      to upgrade your scripts if they use getinfo.

    Name: GetInfo
    Action: Get various info into variable.
    Syntax: getinfo(info, [param1])
      info:   [required] sort of info (New: *NOT* case-sensitive!)
      param1: [optional] depends on info
      return: retrieved info
    Possible values for info and param1:
    - "CountSelected", [(unused)]
      Count of selected items in List.
    - "SelectedItemsPathNames", [delimiter=CRLF]
      All selected items (full path) in List, delimited by param1.
    - "SelectedItemsNames", [delimiter=CRLF]
      All selected items (name, no path) in List, delimited by param1.
      ::$a=getinfo("CountSelected"); msg $a;
      ::$a=getinfo("SelectedItemsPathNames", ""); msg $a;
      ::msg getinfo("selecteditemsnames", chr(10));
  • ! Scripting: Empty string "" was wrongly interpreted as numerical operand in a comparison. Fixed.
  • ! Duplicate servers in Tree/Nethood under certain conditions. Fixed.

Thursday, September 18, 2008

v7.60.0016 - 2008-09-18 14:53

  • ! Scripting: Unquoted comparison operators inside functions lead to mal-parsing:
      ::msg quote(<clipboard>);
      ::msg quote(2>1?"true":"false");

v7.60.0015 - 2008-09-18 12:47

  • +++ Scripting proudly presents its first function!
      Name:   quote
      Action: Double-quote a string.
      Syntax: quote([string])
              return: quoted string
        ::msg quote("a"); // "a"
        ::msg quote(1);   // "1"
        ::msg QUOTE(1);   // "1"
        ::msg quote();    // ""
        ::msg quote;      // quote
      Of course, nesting and concatenating is no problem:
          msg "Quotes added using function quote(): $a";

      Notes on functions
      (1) Function names are not case-sensitive: QUOTE() = quote().
      (2) Even without any argument -- e.g. quote() -- the parentheses
          are mandatory, else the function is not recognized.
      (3) Functions are not interpolated when inside double-quotes.
          ::$a = "clever"; msg "Wow, quote($a)!";
            = Wow, quote(clever)!
          ::$a = "clever"; msg "Wow, ".quote($a)."!";
            = Wow, "clever"!
      (4) Step Mode: Functions are individually stepped. The current
          script line is marked green when a contained function is
          stepped as opposed to the main command of the line.
          You can even skip (button Skip) functions individually, in
          which case the function name is returned with the resolved
          arguments. For example:
            ::msg quote(chr(64));
          If you continue both functions the result is:
          If you skip chr() and continue quote() the result is:
          If you continue chr() and skip quote() the result is:
          If you skip both functions the result is:
      (5) Step Mode: When you "Continue without Stepping" on a function,
          the stepping is only suspended for all functions in the
          current script line / command.
  • + Scripting got a new function.
      Name:   chr
      Action: Return a specific character.
      Syntax: chr(charcode)
              charcode: valid range 0-65535 (0xFFFF)
              return: character
        ::msg chr(88).chr(89);
        ::msg chr(28888); // looks Chinese to me
        ::msg quote(chr(28888)); // yep, of course you can mix 'em
        Values outside the valid range but inside 32 bit are silently
        corrected using a bit mask (AND 0x0000FFFF). Values outside 32
        bit are set to 0.
  • + Scripting got a new function.
      Name:   confirm
      Action: Pops message box with OK/Cancel, returns result.
      Syntax: confirm(message)
              return: 1 on OK, 0 on Cancel
        ::msg confirm("Ok?");
        ::msg "You pressed " . (confirm("Ok?")==1?"OK":"Cancel") . ".";
        ::msg confirm("Ok?") . confirm("Are you sure?");
  • + SC "input" in its single-line variant would accept multi-line default values, e.g. when the default was retrieved from clipboard as in:
      ::input $a, "Enter URL", <clipboard>;
    Fixed: Now only the first line is taken in such cases.
  • + Scripting | Step dialog: Now you can view a list of all variables currently on the stack. There is a button which is only shown when there are any variables. You may also use the context menu, or simply press "V".
    Note that if the Step dialog is used for showing an error message, currently no variables can be shown. Might be added later.
  • * Scripting | Step dialog: Some design changes.
  • + Scripting: Now commenting is supported everywhere. So you can paste this into the Address Bar and it will work:
      ::msg /*they can be inserted anywhere!*/ "hi!" /* anytime */;
    Same for Favorites, PFA/POM, and wherever Quick Scripting is supported.
  • * Scripting: Comparisons are now done as in PHP. The rule is: "If you compare an integer with a string, the string is converted to a number. If you compare two numerical strings, they are compared as integers."
      ::msg (0 == "a");     // 0 == 0 -> true
      ::msg ("1" == "01");  // 1 == 1 -> true
      ::msg ("1" == "1e0"); // 1 == 1 -> true
      ::msg ("1" < "2");    // 1 <> true
      ::msg (" 1" < " 2 "); // 1 <> true
      ::msg ("-2" < "-1");  // -1 < -2 -> true
      ::msg ("0"?"true":"false"); // 0 -> false
      ::msg ("2"?"true":"false"); // 2 -> true
      ::msg ("a"?"true":"false"); // 0 but not "0" -> true!!
    If both parts are non-numeric then the comparison is alphabetical:
      ::msg ("2a" < "10a"); // -> false!
    The valid range of compared integers is -2147483648 - 2147483647 (32 bit). Numbers outside that range are silently converted to 0 (zero) before the comparison takes place.
  • ! Scripting: Closing the app while a script was running could lead to a crash. Fixed.
  • ! Scripting: A comment like /* ' */ (containing a single or double quote) would take out everything following it. Fixed.
  • ! List: Doing menu Go | Up while a long search (> 500 msecs) was in progress would lead to a confused list. Fixed: Now this action will first stop the search. Then you have to Go Up again to continue.

Tuesday, September 16, 2008

v7.60.0012 - 2008-09-16 15:14

  • + Scripting: Now commenting at line ends is supported. Comments begin with a double-forward slash (outside of any quotes) and end at the end of the line.
      - $a = <xypath>; assert $a=="<xypath>"; //should not fail
      - $a = <xypath>; //assign XY path
          assert $a=="<xypath>"; //should not fail
      - "getinfo CountSelected"  // comment
          getinfo $count,        // comment
          "CountSelected";       // comment
          assert $count!=0,      // comment
          "You must select a file before running this script!"
  • + Scripting: Now block comments (aka C-style comments) are supported. They start with /* (outside of any quotes) and end with the next */ (outside of any quotes) and can span any number of lines.
      - /* This is
        a multi-line
        block comment
        */ msg "hi!";
      - msg /*they can be inserted anywhere!*/ "hi!" /* anytime */;

    Remarks on Comments
    (1) Line-end and block comments overwrite each other:
          ::msg "Hi!"; // /*this is not a block comment starting...
          ::msg /* //this is not a line end comment starting... */ "Hi!";
    (2) Make sure you don't nest block comments. It is easy to make
        this mistake if you are trying to comment out a large block of
          msg 'This is a test'; /* Will cause a problem */
        This, however, will work since // overwrites the /* */ comment:
          //msg 'This is a test'; /* This comment is NO problem */
    (3) Comments are not supported in Quick Scripting! This is
        everywhere where no multiline scripts are possible: So they
        won't work in the Address Bar, PFA, Favorites...
  • + Scripting: Now you can nest expressions using parentheses, aka round brackets: ( ). There's no practical limit to nesting depth and superfluous parentheses are silently removed.
    Examples where parentheses are merely decor:
      ::msg "a" . "b";
      ::msg ("a" . "b");
      ::msg ("a") . ("b");
      ::msg (("a") . ("b"));
      ::msg ((("a") . ("b")));
      ::msg "a" . "b" . ();
        = ab
      ::msg "a" . ("b" . "c");
      ::msg ("a" . "b") . "c";
        = abc
      ::msg "a" == "a" . "a" == "b";
      ::msg ("a" == "a") . ("a" == "b");
        = 10
    Examples where parentheses actually make a difference:
      ::msg "a" == "a" . "a";
      ::msg ("a" == "a") . "a";
        = 1a
      ::msg "a" == ("a" . "a");
        = 0
    Examples for nesting errors:
      ::msg ("a" . "b"; // ')' missing!
        = ("a" . "b"
      ::msg "a" . "b"); // '(' missing!
        = a"b")
  • ! Icon Overlays were not always correctly auto-refreshed in Tree and List. Fix #2.

Monday, September 15, 2008

v7.60.0010 - 2008-09-15 22:08

  • + Toolbar: Added button "Show Tree".
  • ! A FVS related bug from 7.50 could still survive in corrupted INIs and fvs.dat files. Fix #2.
  • * Scripting: It is not necessary anymore (but allowed) to surround comparison operators with blanks. However, to avoid ambiguities in parsing, you have to put XY internal variables (<curpath>, <xyver>...) within doubled quotes strings _IF_ they are to be interpolated!
      ::msg <xypath>;         = okay, variable is isolated
      ::msg "<xypath>";       = okay, variable is isolated & quoted
      ::msg "XY = ".<xypath>; = okay, variable is isolated
      ::msg XY = <xypath>;    = NOT okay, variable is interpolated
                                but not quoted
      ::msg "XY = <xypath>";  = okay, variable is interpolated &
    These work all the same:
      ::assert <xyver>>="7.60.0009"
      ::assert "<xyver>">="7.60.0009"
      ::assert <xyver> >= "7.60.0009"
      ::assert "<xyver>" >= "7.60.0009"
      ::assert ("<xyver>" >= "7.60.0009")
  • ! SC "text" would get confused with UNIX files (linefeed = LF) when a line breaker was active. Fixed. Also added support for Max files (linefeed = CR).
  • ! Scripting: A Ternary Conditional and a Comparison could under certain conditions be processed when inside quotes. Fixed.

v7.60.0009 - 2008-09-15 12:51

  • ! Scripting: The ternary conditional was repeatedly processed with unpredictable results. Fixed.
  • ! SC "download" failed when target path/file name was passed (since yesterday). Fixed.
  • + Scripting: Now comparisons of two values are evaluated in-place.
    The "comparison" has the form
        "a" operator "b"
    where "a" and "b" are whole strings (yet without any concatenators, but this will change soon...), and "operator" can be one of the following:
      == Equal
      != Not Equal
      <  Less than
      >  Greater than
      <= Less than or Equal to
      >= Greater than or Equal to
    NOTE: To prevent ambiguities with XY internal variables
    (<curpath>, <xyver>...) the comparison operators must be
    surrounded by blanks!
    If the comparison evaluates as True it is set to "1", else it is
    set to "0".
      ::msg "a" == "a";
        = shows '1'
      ::msg ("a" == "a") . ("a" == "b");
        = shows '10'
      ::$r = ("a" == "a"); $r = ($r == 1?"True":"False"); msg $r;
        = shows 'True' (note that the parentheses are optional)
      ::$comparison = "a == a"; assert $comparison == "a == a";
        = no assertion error
      ::$minver="7.60.0009"; assert <xyver> >= $minver,
        "This script needs at least XY $minver!"
  • * Scripting, ternary conditionals:
    NOTE: To prevent ambiguities with XY internal variables (<curpath>, <xyver>...) the comparison operators must be surrounded by blanks!
  • * Scripting Tip: It's strongly recommended that you (double- or single-) quote your strings because more and more characters acquire a special meaning in scripting. The following are (or soon will be) such special characters:
  • * Scripting | Step dialog: Now the options menu also appears on right-clicking any of the two lists.
  • ! Icon Overlays were not always correctly auto-refreshed in Tree and List. Fixed.

Sunday, September 14, 2008

v7.60.0008 - 2008-09-14 21:28

  • + Scripting got a new command:
      - Assert
        Action: Interrupt processing on certain conditions.
        Syntax: assert condition, [message], [continue=0]
        condition: [required] any expression that evaluates
                   to True or False
        message:   [optional] message that's displayed if
                   condition evaluates to False
        continue:  [optional] set to 1 to allow continuing the
          script after displaying the message; else the "Continue"
          button is disabled; default is 0
      Usage: This is mainly a debugging feature to interrupt
        processing on certain conditions. If the condition evaluates
        to True the program flow is not interrupted, otherwise you are
        notified and can investigate what went wrong and decide
        whether to continue and cancel (if continue=1). So, "assert"
        can be very useful to keep your scripts under some control.
        Apart from debugging you may use it to check (continue=1) or
        enforce (continue=0) critical preconditions for your scripts
        to run successfully.
        ::$a="A"; assert $a=="A", '$a has wrong value!'
          = no message (condition is True)
        ::$a="A"; assert $a=="B", '$a has wrong value!', 1
          = message (condition is False)
        ::$a="A"; assert $a=="B", '$a has wrong value!', 0
          = message (condition is False) and no option to continue
        ::getinfo $count, "CountSelected";
          assert $count!=0,
          "You must select a file before running this script!"
          = if no files are selected: message
  • * Scripting | Step dialog: Improved coloring in the bottom list to better distinguish spaces from nothing. Also made it wider.
  • ! SC "download" needed extra refresh to actually display the downloaded file if the target folder was the current one. Done.
  • ! Scripting, ternary conditional: The following examples were not parsed correctly for various reasons:
      ::msg "Good "."12" <=<date>? "afternoon": "morning"."!";
      ::?regexreplace $name, "some name [ETA: 12-2008]",
        "^(.+?) \[ETA: .+$", "$1";

Saturday, September 13, 2008

v7.60.0007 - 2008-09-13 14:41

  • + Scripting: Added a bit of conditional logic in a form of "ternary conditionals" as used in various programming languages (e.g. PHP). The logic (this structure is not yet part of XY!) is this:
      if (condition) {
      variable = value-if-true;
      } else {
      variable = value-if-false;
    As ternary conditional the same can be written like follows and is now available in XY scripting:
      variable = (condition) ? value-if-true : value-if-false;
    The parentheses and the blanks are optional, so these are identical:
      variable = (condition) ? value-if-true : value-if-false;
      variable = (condition)? value-if-true: value-if-false;
      variable = condition?value-if-true:value-if-false;
    The part "condition" has the form
        "a" operator "b"
    where "a" and "b" are whole strings (without any concatenators), and "operator" can be one of the following:
        ==  Equal
        !=  Not Equal
        <   Less than
        >   Greater than
        <=  Less than or Equal to
        >=  Greater than or Equal to
     (none) True if expression is not 0 and not ""
    The parts "value-if-true" and "value-if-false" must be whole
    strings (without any concatenators).

      ::$a = <date>>= "12"? "afternoon": "morning";
        msg "Good $a!";
      ::$a = ( == "12-24")? "": "not ";
        msg "It's $a"."X-mas!";
      ::$a=1;$b=2;$c=3;$d=4;$e=$a==$b?$c:$d; msg $e;

    Now the best part: You can employ ternary conditionals in any argument or part of argument!
      ::msg "Good ".<date> >= "12"? "afternoon": "morning"."!";
      ::msg "Good ".(<date> >= "12")? "afternoon": "morning"."!";
      ::msg "It's ".<date> == "12-24"? "": "not"." X-mas!";
      ::getinfo $a, "CountSelected"; $r=$a?"$a":"no";
        msg "There " . $a!=1?"are":"is" . " $r selection" .
        $a!=1?"s":"" . ".";
  • ! FVS: As a side-effect of a recent fix in v7.60.0005 the list styles would get lost when switching between special folders (MyComputer, Nethood) and normal folders on a fresh installation. Fixed.
  • ! SC download: Extension .htm was appended to all downloaded files that were not *.htm. Stupid bug. Fixed: Now .htm is appended only to files that are HTML but lack the extension.
      ::download "http://www.xyplorer.com/xyfc/viewforum.php?f=2"
        = creates local copy "viewforum.php_f=2.htm" (where _ is your
          replacement char for illegal characters).
  • + Configuration | Color Filters: To reset textcolor or backcolor to the default value, simply hold CTRL when you click the Text Color resp. Back Color button.
  • ! Monospace Fonts: Possible issues (wrong size) due to misinterpreted number formating when user switches locale. Fixed. Your monospace font size settings will be reset to factory defaults due to the fix.

Friday, September 12, 2008

v7.60.0005 - 2008-09-12 15:14

  • +++ Color Filters 2.0: Now you can define the *backcolor* of items! The usage is just as simple as it has been before:
      Before: patternlist>textcolor
      Now: patternlist>textcolor,backcolor
    And just like before, you can configure your color filters either in Configuration Color Filters, where you can define the colors using the standard Windows color selector. Or you can use List Management Color Filters, where you can enter the colors directly in RRGGBB format.

    - The usage of backcolor is optional, of course. So if you are not
      interested in this new feature you don't have to do anything and
      everything stays as it has been before.
    - Leave any of the fields empty to use default colors:
      /s>FF0000,FFFF80 -> red on light yellow
      /s>FF0000        -> red on default back color
      /s>,FFFF80       -> default text color on light yellow
    - The backcolor will not cover the whole row but just the name of
      the item. Therefore you should choose text colors that work on the
      filter's backcolor as well as on the list's backcolor.
    - If an item is selected the backcolor will be stretched 7 pixels
      to the right in order to have it still visible behind the focus
  • + Scripting got a new command:
      - GetInfo
        Action: Get various info into variable.
        Syntax: getinfo output, info, [param1]
          output: [required] variable
          info:   [required] sort of info (case-sensitive)
          param1: [optional] depends on info
        Possible values for info and param1:
        - "CountSelected", [(unused)]
          Count of selected items in List.
        - "SelectedItemsPathNames", [delimiter=CRLF]
          All selected items (full path/name) in List, delimited by
          ::getinfo $a, "CountSelected"; msg $a
          ::getinfo $a, "SelectedItemsPathNames", ""; msg $a
  • * Scripting command "InternetFlags": Now turning the flag ON is the default if you don't pass a value. The interflags setting lives on the stack. Also the error handling has been improved.
    Revised command profile:
    - InternetFlags
      Action: tune internet commands (Download, ReadURL)
      Syntax: internetflags name, [value]
              (yes, only this is currently supported)
        value: [optional] 1 = On [default]
                          0 = Off
      Turn it on:
        ::internetflags "INTERNET_FLAG_NO_COOKIES"
        ::internetflags "INTERNET_FLAG_NO_COOKIES", 1
      Turn it off:
        ::internetflags "INTERNET_FLAG_NO_COOKIES", 0
  • + Scripting | Step dialog: Now the first two lines display
      (1) the current script resource
      (2) the current script caption
  • ! A FVS related bug from 7.50 could still survive in corrupted INIs and fvs.dat files. Added code to handle and repair this.

Thursday, September 11, 2008

v7.60.0003 - 2008-09-11 13:24

  • ! Scripting: Crash (error 9) on empty scripts (no commands). Fixed.

v7.60.0002 - 2008-09-11 12:27

  • + Scripting: Improved error messaging. Now the Step dialog is exploited for the task of telling you what went wrong where. The dialog also has been slightly widened.
  • + Scripting got a new command:
      - InternetFlags
        Action: tune internet commands (Download, ReadURL)
        Syntax: internetflags name, value
                (yes, only this is currently supported)
          value: 1 = On, 0 = Off
        - The default is to use cookies:
          ::input $a, "Enter URL", ;
            download $a;
        - Do it like this to not use cookies:
          ::internetflags "INTERNET_FLAG_NO_COOKIES", 1;
            input $a, "Enter URL", ;
            download $a;
  • + INI-Tweak to insert prompt on XClosing the app.
    Set to 1 to get nagged by an "Exit XYplorer now?" prompt.

Wednesday, September 10, 2008

v7.60.0001 - 2008-09-10 11:55

  • + Scripting Step Dialog: Added information about the potential risk associated with the command to be executed. There are the following risk classes:
    (3) Potentially harmful because the function ID might refer to
        some risky process which is unknown at this point (either an
        internal command or a UDC):
          #[function ID]
    (2) Potentially harmful because files or folders are affected:
          backupto, copyto, delete, download, moveto, new, open,
          openwith, rename, run, setkey, swapnames, timestamp
    (1) Potentially harmful because step mode is terminated:
    (0) Harmless:
          (all others)
    Class 3, 2, and 1 are marked with a yellow "warning" icon, class 0 with a green "ok" icon.
  • * Menu Window | Show Navigation Panel / Show Tree / Show Catalog: Change the interrelated logic between the three. Since v7.30.0027 (2008-07-26 21:46) you could get an empty grey area when both Tree and Catalog were hidden but Navigation Panel was shown. This was irritating users and understandably so. Now, when you hide both Tree and Catalog then the Navigation Panel is hidden automatically as well, and it is auto-shown (if necessary) when you show Tree or Catalog.
    Special case: When all three are hidden and you then select Show Navigation Panel, then by default the Tree is shown being the more traditional control and, more imortant, the one the guaranteed contents.
  • * Menu View | Date Column Format | Show Weekday: If "Show Weekday" is enabled and the file date is within the last hour, you now get "Now" instead of "Today". You can tweak the actual word for "Now", for example you can set it to "Ahora" by editing the INI-file like this:
      ; Tweak: 'Now' in file dates
    Or set it to "Today" if you don't care about this new feature.
  • ! Menu File To Clipboard Image: Did not work correctly with ARGB images. Fixed.

Tuesday, September 9, 2008

v7.60.0000 - 2008-09-09 20:45

  • ! Recompiled due to a little bug fix.

v7.60.0000 - 2008-09-09 15:00

Main changes since last release:

  • +++ Scripting meets File Search: The brand-new LoadSearch command is the nexus of two of XYplorer's strongest features: Scripting and File Search. In combination with the Catalog, UDCs, and XYS files, you can now easily build handy libraries of complex live searches.
  • +++ Scripting meets the Web: The brand-new Download command enables you to download any internet content straight into your file manager with a single click or keyboard shortcut!
  • +++ Scripting Syntax: String and variable handling has been massively improved.
  • +++ The release package now includes a sample Catalog which will be used on application startup if no catalog.dat file already exists.
  • +++ Copy Image: A new command allows you to copy the image of an image file directly to the clipboard without first having to open the file in an image viewer application.

v7.50.0022 - 2008-09-09 09:32

  • ! The Shell's Browse For Folders dialog did not always expand a network computer's branch to show the shared folders. Fix #2.
  • ! Address Bar: Using Auto-Complete would lead to a permanent folder lock on first level folders (e.g. D:\Test\ but not D:\Test\Test\) due to a mysterious shell bug. This bug does not happen though when Auto-Complete is restricted to folders (and does not include files). Which now is the case.
  • * Backup operation, feedback in the statusbar: You now get status when a file starts to get copied and when it's finished, so you always know what's happening.

Monday, September 8, 2008

v7.50.0021 - 2008-09-08 14:15

  • ! The Shell's Browse For Folders dialog did not always expand a network computer's branch to show the shared folders. This might be fixed now.
  • * Updated the help file.
  • + Upgrade information: When upgrading to 7.60 you get an information about the changes in scripting. It will be shown only once at startup in version 7.60 or higher. Because this BETA is still 7.50 you'll see it on every startup.

v7.50.0020 - 2008-09-08 10:04

  • + Scripting: Re-added command "br" (it had been removed in v7.50.0016). Reason: It's still useful. For example, the simple line ::br; will prevent all automatic line breaking in msg, text, and copytext. So, to show HTML without replacing <br> with CRLF you now can go two ways:
      ::readurl $a, "http://www.xyplorer.com"; text $a,,,,,""
      ::readurl $a, "http://www.xyplorer.com"; br; text $a;

Sunday, September 7, 2008

v7.50.0019 - 2008-09-07 12:57

  • ! Scripting: Variable assigment using the equal-operator did not work without a blank between the variable and the equal-operator. Now it does. All are identical:
      ::$a = "b";
      ::$a = "b";

v7.50.0018 - 2008-09-07 10:42

  • * Scripting: Backward-compatibility needs made it necessary to set the old line breaker <br> as default for the optional linebreaker argument in the following functions:
      - copytext text, [append], [linebreaker="<br>"]
      - msg text, [buttons], [linebreaker="<br>"]
      - text Text, [Width=600], [Height=400], [WindowCaption],
          [Wrap], [linebreaker="<br>"]
    This means, to avoid the automatic replacing of <br> with CRLF you have to pass an empty string ("") as line breaker argument.
      ::copytext "Blah<br>Blah"
        = copies "Blah¶Blah" (<br> is replaced with CRLF)
      ::copytext "Blah<br>Blah", , "<br>"
        = copies "Blah¶Blah" (<br> is replaced with CRLF)
      ::copytext "Blah<br>Blah", , ""
        = copies "Blah<br>Blah" (<br> is NOT replaced)
      ::readurl $a, "http://www.xyplorer.com/index.htm";
        text $a,,,,,""
        = shows HTML without replacing <br> with CRLF
  • ! Menu File | Settings | Load Configuration: INI-files containing extra-dots (e.g. "XYplorer7.50.ini") would not be loaded nor remembered correctly. Fixed.

Saturday, September 6, 2008

v7.50.0016 - 2008-09-06 10:13

  • + Scripting got a new command:
      - ReadURL
        Action: Read the contents of a web file into a variable.
        Syntax: readurl output, url
          output: [required] variable
          url:    [required] URL
          ::readurl $a, "http://www.xyplorer.com/index.htm"; text $a
  • * Scripting command "download": Changed the default file name for the target *again*. Now, to keep it in line with those other creations of XYplorer, the current date is added (and only then, if necessary, a number increment):
      Download-20080905.htm    (download URL to file)
      DroppedText-20080905.txt (drop text to file)
      Clipboard-20080905.png   (paste text/image to file)
    BTW, you can define the format of those dates in Configuration | Report | Filename templates | Date suffix.
  • * Scripting command "status": Now it waits until any pending processes are completed before setting the new status message.
  • * Scripting: Before, line breaking of texts was handled by a global "line breaker" (that could be defined using the command "br"). This line breaker was unconditionally active in three commands: copytext, msg, and text. Now, the line breaker is passed as an optional argument to each of these commands and thus handled individually. This gives you much better control. New syntax for the following commands:
      - copytext text, [append], [linebreaker]
      - msg text, [buttons], [linebreaker]
      - text Text, [Width=600], [Height=400], [WindowCaption],
          [Wrap], [linebreaker]
      Where linebreaker (optional) is any character sequence to be
      replaced by a line break.
      ::copytext "Blah<br>Blah", , "<br>"
      ::msg "Continue script?##Sure??", 1, "#"
  • - Scripting: Removed command "br" (see previous paragraph).
  • * Statusbar: Now displays a Pilcrow (¶) where a message has a line break. Try this to see it:
      ::copytext "Blah<br>Blah", , "<br>"

Thursday, September 4, 2008

v7.50.0014 - 2008-09-04 21:42

  • * Scripting command "download": Changed the default file name for the target from "Download.dat" to "Download.htm". Reason: it is very likely HTML code what you get when you pass just a folder to a http:// address.

Wednesday, September 3, 2008

v7.50.0012 - 2008-09-03 15:31

  • ! Scripting: Variable assignment did not resolve any variables in the part right of the equal(=)-operator. Fixed.
  • ! INI-Tweak WorkAroundFirefox3ImageDropBug: When you dropped an image that was a link at the same time, you would get the HTML code of the linked page under the name of the image file. Fixed:
    Now, you still get the linked HTML but under the full name of the corresponding URL (illegal chars replaced by the user-configured replacement char), with the extension .HTM appended. If the resulting path/name is longer than 200 chars it is cropped (to give you a little room for moving that file).

Tuesday, September 2, 2008

v7.50.0011 - 2008-09-02 21:36

  • + INI-Tweak to make dropping images from Firefox 3 work.
    If set to 1, the images are actually *downloaded* from their web location to your harddisk.

Monday, September 1, 2008

v7.50.0009 - 2008-09-01 23:00

  • !FVS: On a fresh install removing a previously saved Folder View could lead to a total reset of all applied settings (because the Automatic Default Folder View was not yet initialized but applied). While totally harmless because only display is concerned, especially the disappearing icons in the file list (because the List Style was set to all False) could easily lead to a state of shock with some user. Fixed.
  • ! Various bugs. Don't ask. ;)

v7.50.0008 - 2008-09-01 15:35

  • + List Management Dialog: The Editor now supports UNICODE.
  • + Edit boxes: Added a few service key combos to convert selected text
      F5:       to Title Case (converts the first letter of every
                word in string to upper case); this is for ANSI
                strings only
      Shift+F5: to UPPER CASE
      Ctrl+F5:  to lower case
    If no text is selected then the conversion applies to the character right after the caret. Works in all editable multiline boxes, and also in Rename Boxes and Font Preview Sample. BTW, took those KS from UltraEdit.
  • + Scripting: Now you have the usual variable assignment syntax using the equal(=)-operator. Any number of blanks surrounding the "=" are ignored. This syntax is an alternative to the set command, and internally it's converted to a set command.
    For example, these now work indentically:
      ::set $a, "Hi!"; msg $a;
      ::$a = "Hi!"; msg $a;
    Note that the syntax also supports a 2nd parameter -- a bit unusal but why not:
      ::copytext '%tmp%'; set $a, <clipboard>, r; msg $a
      ::copytext '%tmp%'; $a = <clipboard>, r; msg $a
  • * Scripting commands enhanced:
      - getkey, setkey
        Now they support reading/writing values of up to 32,766
        characters. Before the limit was 1,023.
  • ! Scripting command "self": Output variable was not reset to empty when an illegal parameter was passed. Fixed.
  • * Menu File | To Clipboard | Image: Now you can assign a KS.
  • ! Preview Tab | Image Preview | Context Menu: "Copy Original" failed with crash on big pictures (approx 10+ Megapixels, depending on system). Now it does not crash anymore.
  • ! Wildchar use in Go to feature was broken. Fixed.
  • + INI-Tweak to automatically reconnect mapped drives on startup.