Friday, February 15, 2008

v6.80.0077 - 2008-02-15 12:59

  • + Scripting got a new command:
      - selfilter
        Action: Apply a selection filter to the list
        Syntax: selfilter [filterspec], [type = |f|d]
          type: (none) = all, f = files only, d = dirs only
        Examples:
          ::selfilter a*          = select all "a*" items
          ::selfilter a*, f       = select all "a*" files (but no
            dirs)
          ::selfilter a*, d       = select all "a*" dirs (but no
            files)
          ::selfilter *.zip|*.rar = select all ZIP and RAR items
          ::selfilter             = select all items
          ::selfilter , d         = select all dirs
  • * Tab icons: Now, when a tab is locked to a home zone AND is renamed then its icon will always be the one of the tab's home folder. This new behavior is very practical when you use iconized tabs because once you have defined a special icon for the home folder you always recognize that tab by its icon no matter at what subfolder it is currently pointing to.
  • * UDC dialog: Command ID is now displayed on a button. Left-click copies it, right-click pops a little menu.

Thursday, February 14, 2008

v6.80.0076 - 2008-02-14 14:04

  • ! Two bugs with scripting and opening files. Fixed.

v6.80.0075 - 2008-02-14 12:35

  • + Scripting got a new command:
      - write
        Action: Enter a script manually.
          This new powerful command allows you to manually enter a
          script which then is immediately executed on OK (press
          Ctrl+Enter to OK the form; the button had to be
          un-defaulted to allow Enter in the textbox). The last
          written script is remembered within the session.
          The entered script may have the format of scripts
          in script files: multi-line with indents, comments,
          caption. Note these obvious differences to scripts
          in script files:
          - No menu is popped.
          - If you enter more than one script only the
            first one is executed.
          - Labels are meaningless and ignored.
        Syntax: write
        Examples:
          ::step;write;
            In the textbox paste the following and press OK:
          "Show Date and Time" msg <dyyyy-mm-dd>; msg <dhh:nn:ss>;
          ::write;msg <clipboard>
            In the textbox paste the following and press OK:
            copytext Hi!
      Remarks:
        The main use of the "write" command will be in debugging
        scripts. But who knows, a fluent script writer might well
        use it for on the fly scripting.

  • + Script files: Now you can hide a script from the popup menu while it still can be referred to via its label. Simply prefix the caption, or if there is no caption the label, with "_".
    For example:
      "_Show date : date"
        msg <dyyyy-mm-dd>
      "_Show time : time"
        msg <dhh:nn:ss>
      "Show Date && Time : datetime"
        sub date;
        sub time
      Or, without captions:
      "_date"
        msg <dyyyy-mm-dd>
      "_time"
        msg <dhh:nn:ss>
      "Show Date && Time : datetime"
        sub _date;
        sub _time

  • + Dialog "Stepping through a Script": Added button "Skip" which allows you to skip the current command and then continue with the script. This is very useful when your script offers an array of options from which you want to manually choose depending on your current needs.
    Example:
      "My daily backups : bup"
        set $p, D:\Archives\<yyyy-mm-dd>;
        step;
        backupto $p, <xydata>\FindTemplates;
        backupto $p, <xydata>\NewItems;
        backupto $p, <xydata>\Scripts;
  • * Stepping through a Script: If you Cancel a script you now get a message on the statusbar instead of a messagebox. One click less.

  • ! Catalog: Relative references to applications were not correctly resolved (namely relative to application path). Fixed.
    Examples:
      If XYplorer is at C:\Programs\XYplorer\XYplorer.exe then
      - Test.exe is resolved to C:\Programs\XY\Test.exe
      - Test\Test.exe is resolved to C:\Programs\XY\Test\Test.exe
      - ..\Test\Test.exe is resolved to C:\Programs\Test\Test.exe
      - ?:\Test\Test.exe is resolved to C:\Test\Test.exe

  • ! Toolbar "Address Bar Go" context menu: "Copy Text" didn't do anything. Fixed.

  • ! Scripting: Parsing commands with params in parentheses did not always work. Fixed.

Wednesday, February 13, 2008

v6.80.0074 - 2008-02-13 11:11

  • + Scripting commands enhanced:
      - setting
        New setting "shownav" (show/hide tree & catalog).
        Example:
          ::setting shownav, 0; msg "Look, no tree!"

      - text
        Syntax: text Text, [Width=500], [Height=300], [WindowCaption]
          Width = of window in pixels (min=200, max = screen width)
          Height = of window in pixels (min=150, max = screen height)
          WindowCaption = window caption
        Example:
          ::text <clipboard>, 600, 400, Clipboard

      - inputfile
        Now you can separate the extensions using | (alternative to ;).
        Example:
          ::inputfile ($file, Desktop, gif|jpg|png, Select Image File);
            text ($file, 600,200)

  • + Scripting: Now you may enclose a function's arguments in brackets. This is purely optional and without an function other than making your scripting code more readable if you are used to bracketing arguments. For example, these work identical:
      ::copytext "sep=;"; text <clipboard>, 600, 400, Clipboard;
      ::copytext ("sep=;"); text (<clipboard>, 600, 400, Clipboard);
  • * UDC Move To, Copy To, and Backup To enhanced. Now you can do something like this:
      ::backupto D:\Archives\XY_<srcver>_<dyyyy-mm-dd>,
          <xypath>\XYplorer.exe
        Backups the current XYplorer.exe to this location:
          D:\Archives\XY_6.80.0071_2008-02-12\XYplorer.exe
    Means: If a source is defined, the first source item can be referred to by variables in the location term. The same now works in scripting commands moveto, copyto, and backupto.

  • ! More scriping glitches fixed.

  • * Visual Filters: Now, you can separate Visual Filters by "|" as well, not only by ";". The | has priority of over ; so you now can filter items containing the ";" character, which has not been possible before:
      Desktop|;|, = List all items containing ";" or ","
    If you state only one pattern and this pattern contains a ; then you have to add another dummy | to avoid that the ; is treated as separator:
      Desktop|;|      = List all items containing ";"
      Desktop|;a|     = List all items containing ";a"
      Desktop|"*; *"| = List all items containing "; "

  • * Selection Filter: Same as above, works as separator.

  • + Toolbar: Added button "Address Bar Go". Clicking it does the same as pressing Enter in the Address Bar. I sometimes lacked a mouse way to do this, so here it is. There's also a little context menu.

Tuesday, February 12, 2008

v6.80.0071 - 2008-02-12 10:59

  • * Scripting commands enhanced: The optional argument "source" in commands moveto, copyto, and backupto now can be a list of items separated by "|" (or " | " -- spaces are ignored).
    Examples:
      ::copyto <curpath>, <xydata>\ks.dat | <xydata>\udc.dat
      ::backupto D:\<dyyyymmdd>, <xydata>\ks.dat | <xydata>\udc.dat

  • + UDCs Move To, Copy To, and Backup To: Added an optional parameter "Source" in analogy to the corresponding scripting commands. Note that "Source" can contain all XY variables and environment variables. And it can be a list of items separated by "|".
  • * UDCs Move To, Copy To, and Backup To: Now, "Location" can contain all XY variables. Before, it supported only the date variable (<d...>).
  • ! Scripting: Fixed some glitches with the new syntax parsing.

Monday, February 11, 2008

v6.80.0070 - 2008-02-11 22:07

  • *** New Scripting Syntax: Isn't that the fun of playing with beta-versions? You are part of the flow! Now, for example, you can throw all your old scripts into the garbage and start from scratch! :) I decided to make XY scripting look like most scripting nowadays looks, e.g. JavaScript, CSS, PHP. Statements are separated by ";", function arguments by ",", quoted separators do not count as separators, etc.

    Here are the new rules for XY scripting
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    - commands are separated by ;
    - spaces around ; are ignored
    - arguments are separated by ,
    - spaces around , are ignored
    - arguments containing ; or , must be quoted
    - arguments that shall begin or end with spaces must be quoted
    - all arguments can be quoted
    - if quoted arguments contain quotes all inner quotes must be
      doubled

    Watch especially the following changes
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    - The script marker :: at the beginning of a script is not
      necessary anymore but still can be used without problem. There
      is, however, still one important use: Only if you prefix a
      script with :: you can run it through a location interface
      (Address Bar, Goto, Catalog (Goto), Favorites, UDC Goto).
      Example:
        ::set $a, ";"; msg $a;
          Paste it into the address bar and press enter.
    - The commands copytext, copytexta, msg, text, and set: they do
      *not* get special treatment anymore! If their last argument
      contains a separator the argument has to be quoted -- just like
      with any other command.
    - You do not have to put a space behind the , (argument separator)
      anymore (but you can).
    - Arguments that are in quotes are auto-unquoted. So, if you want
      an argument to stay in quotes you have to double-quote it:
        ::text ""in quotes""
    - Captions and Labels in XY script files (XYS) have to be done
      slightly different now, namely quoted:
        "Caption : Label"...
      This is simply prefixed to the script proper, for example:
        "Go to C root : croot" goto C:\
        "Go to C root : croot"goto C:\
        "Go to C root : croot"   goto C:\
        "Go to C root : croot"
          goto C:\
        As you see, the spaces after the caption are optional.

    Examples
    ~~~~~~~~
    Typical vanilla scripting:
      goto Desktop|; sortby m, d; sel 1; focus List;
    These are all okay and identical:
      msg "Quoted" "Sep,Sep" Unquoted
      msg "quoted" "sep,sep" unquoted;
      msg ""quoted" ""sep,sep"" unquoted"; (*)
      msg """quoted"" ""sep,sep"" unquoted";
        (*) Note that this works without dbl-quoting "quoted";
            however, it would fail if "quoted" contained a separator.
            To be on the safe side always dbl-quote inner quotes.
    These arguments MUST be quoted because they contain separators
      goto "C:\path,with,commas"
      goto "C:\path;with;otherstuff"
      goto "C:\path, with; otherstuff"
      copyto D:\,"E:\My;File.txt"
    This is easy now (was not possible with old syntax):
      set $a, ";"; msg $a;  ($a = ;)
      set $a, """"; msg $a; ($a = ")

  • - Stepping: dropped command "sep". Not necessary anymore.

  • * Stepping through a Script dialog: "Continue Script without Stepping" (in the button context menu) now also disables stepping mode that was previously set by the "step" command.

  • + 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 on the last if
          less items in list), but does not select.

  • + New variable: <clipboard> = current clipboard contents.
      The returned format depends on the clipboard contents:
      - File items: one item per line, CRLF ends a line.
      - Text: the text.
      - Else (e.g. empty, or images): nothing.
      Example:
        ::copytext Hi!;msg <clipboard>

  • + Scripting command "msg" now shows a UNICODE aware message box: you will see Chinese. Getting ready for the Olympics...
  • ! Only the first occurence of variable (modified date of current item) was resolved. Fixed.
  • + Tabs: Now the tooltip tells you about Locked, Locked Home Zone, and Home.

Sunday, February 10, 2008

v6.80.0066 - 2008-02-10 11:45

  • + Scripting got a new command:
      - Text
        Action: Shows a text box with a text of your choice. You can
                select and copy parts of the text.
        Syntax: ::text text
        Example:
          ::text curpath: <curpath><br>xypath: <xypath><br>xydata: <xydata>
  • ! Scripting: copyto <curpath> didn't always refresh List. Fixed.
  • ! There was an inconsistency with shortcuts (LNK files) pointing to UNC locations. They would not open/run the target if it was a file (not a folder). Fixed.

Saturday, February 9, 2008

v6.80.0064 - 2008-02-09 14:07

  • +++ User-Defined Commands (UDC): Added two new command categories to give more GUI to scripting and relax the Goto category which was up to now the only way to run scripts via keyboard shortcut. They should be pretty self-evident and self-explaining:
      - Run Script
        Simply enter your script.
      - Load Script File
        Works identical to the script command "load". No wonder it
        has an optional parameter "Label" to identify scripts inside
        the loaded file and run them directly.
  • + Stepping through a Script: The dialog's buttons now have a little context menu featuring one additional option "Continue Script without Stepping". Select it to close the dialog and turn off general stepping mode (the mode you select via toolbar, or via CKS Miscellaneous / Scripting / Step Through Scripts).
    When the unstepped script is done, stepping mode is automatically reenabled.

  • * Scripting command changed/added:
      - CopyText, CopyTextA
        The 2nd optional argument "a" for append has been dropped.
        Reason: Allow the text argument to contain commas (argument
        separators) without problems (see next paragraph). For
        appending text to clipboard use the new command CopyTextA
        instead:
        Syntax: CopyText  text = copy text to clipboard
                CopyTextA text = append text to clipboard

  • + Scripting commands enhanced:
      - Msg
        Now supports the line breaker <br>.
        Example:
          ::msg line1<br>line2

      - CopyText, CopyTextA, Msg
        Now the text argument can contain commas+blanks without
        problems. They will not be confused with argument separators.
        Example:
          ::copytext one, two, three
            Copies "one, two, three" to the clipboard.

      - Focus
        You can alternatively use long arguments.
          ::focus L
          ::focus List
          ::focus Lanzarote
        ... will all focus the list. Only the first letter counts.
        Same with the others:
          ::focus Tree
          ::focus Catalog
          ::focus Address Bar

      - InputFile
        Now supports a ;-separated list of extensions.
        Example:
          ::inputfile $file, Desktop, gif;jpg;png, Select Image File

  • + Scripting got a new command:
      - Sub
        Action: Calls a script by label inside the same script file.
                This command can only be used inside script files.
        Syntax: ::sub label
        Examples (in script file):
          Show date : date
            ::msg <dyyyy-mm-dd>
          Show time : time
            ::msg <dhh:nn:ss>
          Show Date && Time : datetime
            ::sub date
            ::sub time
        Funny ideas like this are caught be the recursion checker :-)
          Recursive Sub : rec
            ::sub rec

  • + Enlarged the list of supported environment variables to "all". Before, only those the resolved to paths had been supported. Now you may use some or all of the following plus maybe others (depending on your OS and system settings):
      %CLIENTNAME%
      %COMPUTERNAME%
      %FP_NO_HOST_CHECK%
      %HOMEPATH%
      %NUMBER_OF_PROCESSORS%
      %OS%
      %PATHEXT%
      %PROCESSOR_ARCHITECTURE%
      %PROCESSOR_IDENTIFIER%
      %PROCESSOR_LEVEL%
      %PROCESSOR_REVISION%
      %SESSIONNAME%
      %USERDOMAIN%
      %USERNAME%

  • + The Open File dialog (as used by ::inputfile) did not support UNICODE. Now it does! E.g., you now can select and return items with Chinese characters.

Friday, February 8, 2008

v6.80.0063 - 2008-02-08 14:25


  • +++ Now you can control the application data path used by XYplorer. Up to now this path was hard-coded to be identical to the application path. Now you can set it to any location you like by manually creating and editing a file called "startup.ini" which has to be located in the application path.
    The format of startup.ini is that of INI files, and it has only one section and one key. Here's an example with a hard-coded app data path on drive E:
      [Appdata]
      Path=E:\XYplorer\appdata
    Here's an example with a soft-coded app data path using an environment variable. It is resolved depending on the current user account:
      [Appdata]
      Path=%appdata%\XYplorer
    Note that you do not have to use this new option. If you do not manually create a file "startup.ini" nothing will change for you! If you do use this new option then these are the only files located in app path...
      XYplorer.exe
      XYplorer.hlp
      XYplorer.cnt
      startup.ini
    ... and these are the files and folders located in app data path:
      FindTemplates
      NewItems
      catalog.dat
      ks.dat
      servers.dat
      udc.dat
      tipoftheday.htm
      tipoftheday_user.htm
      XYplorer.ini (and alternative INIs)
    Naturally, if you change the app data path you will have to copy your current app data to the new path if you want to continue working in the same state as you left the app before changing the app data path.

  • + Menu Go: added command "Go to Application Data". It will beam you to the app data path. If you haven't set this path using startup.ini it will be identical to app path, so the command will be identical to the one above it. In that latter case I opted to hide the command in order to keep a clean interface. In other words, to see this new command you have to go the startup.ini way... :)

  • * Menu Go | Go to Application Folder: renamed it to "Go to Application Path", simply because it's the more common term.

  • + Scripting commands enhanced: added an optional argument "source" to the following commands:
      - moveto location, [source]
      - copyto location, [source]
      - backupto location, [source]
        Source: If missing then the currently selected items in Tree,
          List, or Catalog (depending on current focus) are taken as
          source. If given then the source is the source. :)
      Examples:
        ::copyto D:\Archives\<dyyyy-mm-dd>, <xypath>\XYplorer.exe
          Copies the currently running XYplorer.exe to a folder
          created on the fly based on the current date.
        ::backupto D:\Archives\<dyyyy-mm-dd>, <xydata>
          Backups the complete app data folder to a folder
            created on the fly based on the current date.
      Example to use in a XYS (XYplorer Script File):
        Copy From
          // yes, you can wrap the caption like this :)
          ::inputfolder $source, , Choose source folder to copy
            into current location
          ::copyto <curpath>, $source
    Thanks to "jacky" for the wonderful "source" idea!

  • + New variable: <xydata> = app data path (unslashed).

  • * Scripting: Any tab characters in script files are now interpreted as if they were two space characters each.

  • * Scripting command "inputfolder" now returns all folders including drives/root paths unslashed. This ensure predictable returns and thus makes further processing easier.

  • ! Scripting: The recursion checker could be tricked out. Should be fixed now.

  • ! Reconnecting Mapped Network Drives did not work under Vista.
    Fixed #2.
    + The Browse-For-Folder dialog did not support UNICODE. Now it does! E.g., you now can select and return items with Chinese characters.

Thursday, February 7, 2008

v6.80.0062 - 2008-02-07 12:18

  • + Scripting got a new command:
      - Msg
        Action: show a message box with a text of your choice
        Syntax: msg text
        Examples:
          ::msg Hello!     = show "Hello!"
          ::msg <xypath>   = show app path
          ::msg <dhh:nn:ss>= show time
  • + Scripting command "setting" enhanced: Now any changes using the setting command will be automatically undone when the script ends or is previously terminated. You can bypass this new behavior by adding the new parameter "p" (for permanent).
      New Syntax: setting name, value=1|0|r, [p]

    Alternatively to adding "p", you can use new the variant command "settingp" which is all identical to "setting" apart from resulting in permament changes:
        settingp name, value=1|0|r

    For example, this script will hide the folders, pop a message, and then show them again:
      ::setting HideFoldersInList::msg Look! No folders!
    These scripts will hide the folders, pop a message, and keep them hidden:
      ::setting HideFoldersInList, , p::msg Look! No folders!
      ::settingp HideFoldersInList::msg Look! No folders!

    This script shows you how to hide and reshow folders manually (lines wrapped!):
      ::setting HideFoldersInList, , p::msg Look! No folders!
      ::setting HideFoldersInList, 0, p
    This works identical to the one above. If the last "setting" command in the script uses the "p" parameter then there will be no auto-restore for that setting.
      ::setting HideFoldersInList::msg Look! No folders!
      ::setting HideFoldersInList, 0, p
  • ! Scripting: The previous command's arguments were not reset when the next command has no arguments at all. Fixed. This works now as expected (turns filter *.txt on and then off again):
      ::filter *.txt::filter
  • ! Scripting: There were some issues with recursive scripts. For example, a Goto UDC pointing to itself by number:
      Goto ::#1402
    would have crashed the app with stack oveflow. Now, it does not crash anymore but behaves good-mannered in informing you politely about the stack overflow. But that's no all, read on...
  • + Scripting: Added a recursion checker that should in most cases detect a recursive script structure and will terminate the script in that case (with a message).
  • + Configuration General: Added option "Expand tree nodes on single-click". When enabled any non-expanded tree node with child nodes will expand on a single click.