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.

Wednesday, February 6, 2008

v6.80.0061 - 2008-02-06 11:56

  • + Scripting: Added a number of commands that allow you to change or ensure certain settings, and later (typically at the end of your script) restore them to the previous value.
      Syntax: setting name, value=1|0|r
        name: can be any of the following
          ShowFloppies
          ShowHiddenDrives
          ShowHiddenItems
          ShowSystemItems
          ShowNethood
          HideFoldersInList
          ShowFolderSizeInList
          SortFoldersApart
          KeepFoldersOnTop
          SortNatural
          ResortAfterRename
          AutoRefresh
        value:
          1 = true (default)
          0 = false
          r = restore previous value
      Examples:
        - If the nethood is currently hidden the following script
          will show the nethood and then hide it again. If the nethood
          was shown anyway the script will do nothing at all.
            ::setting shownethood, 1::setting shownethood, r
        - The following will hide folders in list (or do nothing if
          they are already hidden):
            ::setting HideFoldersInList
  • + Scripting got a new command:
      - Filter
        Action: apply a visual filter to the current tab
        Syntax: filter [filterspec]
        Examples:
          ::filter *.zip;*.rar = show only ZIP and RAR files
          ::filter             = remove any filters

Tuesday, February 5, 2008

v6.80.0060 - 2008-02-05 14:11

  • + Scripting: Added new stepping dialog. Looks better than before, and its screen position is remembered between steps, scripts, and sessions.
  • + Scripting: Now in all arguments of all scripting commands the following types of variables are resolved in this order:
    (1) User variables defined by "set", "unset", "input",
       "inputfile", or "inputfolder"
    (2) XYplorer variables like <curpath>, <dyyyy>, etc.
    (3) Environment variables like %temp%, %appdata%, etc.
    Obvious exception: The first argument (the variable name) of "set", "unset", "input", "inputfile", and "inputfolder" is not resolved.
    Examples:
      ::goto <xypath>    = goes to app path
      ::?goto <xypath>   = pops stepping dialog first
  • + Scripting command "goto": Now, if the destination could not be reached you are prompted whether to continue the script or quit.
  • ! Tree, List: Renaming volume labels (drive display names) by pressing F2 did not work with mapped drives. Fixed.

Saturday, February 2, 2008

v6.80.0058 - 2008-02-02 10:21

  • * Tree, List, Catalog: Made the borders around various boxes a little softer. Also the focused-and-selected item in a non-focused list is better discernible now from the other selected items.
  • ! Highlight and Box Colors were not preset anymore in color dialog (since 2 days ago). Fixed.
  • ! Reconnecting Mapped Network Drives did not work under Vista. Fixed.

Friday, February 1, 2008

v6.80.0055 - 2008-02-01 09:51


  • + Scripting got a new command:
      - Focus
        Action: focus one of the main controls
        Syntax: focus {L|A|T|C}
        Examples:
          ::focus   = focus List
          ::focus L = focus List
          ::focus T = focus Tree
          ::focus A = focus Address Bar
          ::focus C = focus Catalog

  • * Scripting command enhanced:
      - CopyText
        Now variables in the text are resolved.
        Example:
          ::copytext <xypath>
            = copies XY's app path to clipboard

  • ! Script files: You could not wrap a script caption over several lines. Now you can.
    Example:
      This
        copies
        XY'
        s path
        ::copytext <xypath>

  • * Scripting command "loadscriptfile" evolved to a very important command. So I renamed it to "load". But I keep "loadscriptfile" for back-compatibility.

  • + Added some general variables that can be used in various places in UDCs and scripts. Note that all paths, even drives are returned unslashed (<curpath>, which is not a new variable, did slash drives before).
    <curpath> The real current path
              e.g. C:\Dokumente und Einstellungen\Donald\Desktop
                   C:\Dokumente und Einstellungen\Donald\Desktop\New Stuff
                   C:   (was C:\ before!)
    <curpath_s> The special current path (if applicable,
                else = <curpath>)
              e.g. Desktop
                   Desktop\New Stuff
                   C:
    <xypath>  XYplorer's path
                e.g. C:\Programs\XYplorer

  • ! Restoring a currently unconnected mapped network drive on the fly did not work under Vista. Fixed.

  • * Changed default keyboard shortcuts:
      Window / Show Navigation Panel F8
      Window / Show Catalog Ctrl+F8
    Reason: Later I will add Show Tree (Shift+F8) and all makes sense.

  • * Rename special dialogs: Now the usage tips are displayed in a textbox from which you can select and copy stuff.