Thursday, October 30, 2008

v7.70.0017 - 2008-10-30 13:09

  • * Menu Go | History: The submenu has been completely removed and replaced by a popup list. Reason: With a history of up to 256 entries a submenu is not the interface of choice anymore.
  • * List Management | History:
    - The "Editor Mode" had to be disabled because it cannot handle
      the additional data structures that are needed for HPT.
    - With HPT on, items pertaining to the current tab are displayed
      in bold.
    - Change order of display to latest-item-on-top, with reverse line
      numbering. The line numbers match the numbers you see in history
      popup menus.

Wednesday, October 29, 2008

v7.70.0016 - 2008-10-29 15:56

  • * History per Tab: Changes...
    - Now, history (per tab or global) popup menus will never contain
      more than 32 items at once.
    - When HPT is active, Back and Forward do NOT cycle anymore
      through the current tab's history, but show the old school
      behavior of halting when there is no more.
    - History now can hold up to 256 items. Before it was 64.
    - Toolbar back/forward buttons are now blue if HPT is on.
  • * Hotlist: Since the history got much larger, the Hotlist now is confined to the 32 latest/youngest history entries of global history.
  • * Moved an item to a better place:
    OLD: Menu View | Current Tab | Tab List...
    NEW: Menu Go | Tablist...
  • + Menu View | Current Tab: moved these commands
      Move Tab Left (Ctrl+Shift+Left)
      Move Tab Right (Ctrl+Shift+Right)
    to the "Miscellaneous" category of CKS, into the new section "Tab Functions".
    Reason: You would most likely access the functionality either by KS, or by dragging the tabs with the mouse. The space in this menu can be used better.
    For internal reasons I decided to give them a new Function ID, which is normally a forbidden thing to do. In this case, however, it could be justified because a bug was fixed by it: Their old default KS (Ctrl+Shift+Left)/(Ctrl+Shift+Right) had been non-customizable KS, so you could not remove them, nor could you
    actually use the keys for what they were meant originally (and whence they are non-customizable): group-select in 2-dimensional list views (Thumbs, List, Small Icons...).
    The commands' original IDs are now used by the functions that replaced them in their original menu position. See next...
  • + Menu View | Current Tab: Added commands
      Tab History...
      Tab Hotlist...
    Will do what you think they do. Even when HPT is off.
  • * Icon Overlays: The recent solution for refreshing icon overlays in non-current tree items lead to severe performance problems in some systems. A new way will be found, later.

Tuesday, October 28, 2008

v7.70.0012 - 2008-10-28 15:00

  • +++ Added History per Tab (HPT). To enable it check "History per tab" in Configuration General. In a nutshell, HPT means that Back and Forward move within each tab's individual history, as opposed to the global history over all tabs.
    If HPT is enabled then:
    - Back and Forward (TB buttons and KS) are confined to each tab's
      individual history.
    - Back and Forward will cycle through the current tab's history
      (contrary to global history, where the move halts at both ends).
      Seemed more natural to me. So, if there's more than one history
      item pertaining to the current tab, then both buttons (Back and
      Forward) are enabled, else none is enabled.
    - The Back and Forward buttons's "arrow dropdowns" will each show
      one whole cycle in the repective back or forward order.
    - In the all-history popup menu (triggered via right-click
      "Back"/"Forward" TB buttons, or via KS) those history items
      belonging to the current tab are shown bold.
    - If "History without duplicates" (Config General) is enabled
      then duplicates on different tabs are tolerated.
    - The per-tab-data are saved between sessions. They are even
      maintained and saved if you untick HPT. So you can enable it at
      any time and get the desired functionality right away.
    * History now can hold up to 64 items. Before it was 32.

Monday, October 27, 2008

v7.70.0010 - 2008-10-27 14:38

  • +++ Scripting: Now there are global variables.
    By default, all variables in XY scripting are local, i.e. they are not shared between called and calling scripts. In other words, whenever one script calls another script (e.g. using commands "sub" or "load"), a new local namespace is created by the called script and pushed on the stack.
    Generally, global variables are shared between scripts. However, the mechanism of "globalization" -- (almost) identical to the one used in PHP -- now added to scripting gives you maximum control over what is shared and where. It's implemented by means of a new command:
    Name: Global
    Action: Define one or more variables as global
    Syntax: global variable(s)
      variable: A single variable, or a comma-separated list of up to
        10 variables. If a variable has already been defined as global
        before, then the global command initializes it to its current
        global value, else it is initialized to an empty string.
    Example:
      Here are 2 scripts where the first is calling the second:
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      "script1"
        $foo = 4; // set local value: new local var $foo is created
        msg $foo; // 4 (local)
        // now make $foo global
        // it's initialized to [empty] (assuming nothing created
        // a global $foo before with a different value, which is
        // possible when "script1" has been called by yet another
        // script that has declared $foo as global)
        global $foo;
        msg $foo; // [empty] (global)
        $foo = 8; // set global value
        msg $foo; // 8 (global)

        sub script2; // go down

        msg $foo; // 16 (global, as set in script2)
        msg $bar; // $bar (uninitialized, not a variable)
        // make $bar global
        // it's set to "tequila" (as previously set in script2)
        global $bar;
        msg $bar; // tequila

      "script2"
        msg $foo;  // $foo (uninitialized, not a variable)
        $foo = 15; // set local value: new local var $foo is created
        msg $foo;  // 15 (local)
        // now make $foo global
        // it's set to 8 (as previously set in script1)
        // also create a new global $bar
        global $foo, $bar;
        msg $foo;  // 8 (global)
        $foo = 16; // set global value
        $bar = "tequila"; // set global value
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Notes
    - You can have as many global vars as you like, but it be no more
      than 10 per "global" statement for internal reasons. IOW, add a
      new "global" line for each pack of 10 variables if you really
      need that many.
    - It's recommended that you reflect the global nature of a variable
      in the variable name, for example by prepending $g_ to global
      vars. It will make your code easier to read and maintain.
  • * Scripting Step Mode: Improved handling of binary data. There were some display glitches with binary file data, and unnecessary slowness. Now you can make a pretty fast copy of the current file, even if the file is not small and with step mode enabled, using e.g. this:
      ::writefile("<curbase>-copy.<curext>",
        readfile("<curname>", "b"), ,"b");
  • * Scripting Step Mode: Variables on stack are now displayed with up to 256 chars (rest cropped). Non-printable chars are displayed as ".".

Friday, October 24, 2008

v7.70.0007 - 2008-10-24 17:40

Publication of this update was unfortunately skipped due to very complex editing required and personal medical issues at that time. Doing now for compete documentation purposes. Sorry about the omission!

  • + Implemented the first "On Event Action" (OEA), but for now only as a tweak (still meditating about the interface).
      [Settings]
      OEA_ListRightClickOnWhite=0
    The event is "right-click on the list's white space", and you can currently choose between the following actions:
      0 = Popup the Edit menu (as has been before all the time)
      1 = Popup the Shell menu for the current folder
      2 = Do nothing
    Conc. option 0: Just to remind you, in Configuration Advanced, you currently have two checkboxes where you can specify which commands are shown in the Edit menu.
  • + Tree and List: Now, the shell context menu will show "extended verbs" when you hold SHIFT while right-clicking an item. What those "extended verbs" are depends on your system and software.
  • * SC writefile(): Now, the filename may be relative to the current path. For example, this line will generate a standard report of the current folder in the current folder:
      ::writefile("report.txt", report());
  • * SC WriteFile(): Changed the mode argument to better match
    ReadFile() (see below).
    Syntax: writefile(filename, data, [on_exist], [mode])
      mode:
      t:  [default] text;
          auto-detects whether text can be written as ASCII or needs
          to be written as UNICODE
      ta: text ASCII (1 byte per char);
          wide chars (upper Unicode) are represented by "?"
      tu: text UNICODE (2 bytes per char);
          with LE BOM at file beginning
          LE BOM = Little Endian Byte Order Mark: 0xFFFE
      b:  binary: raw bytes
          each byte is internally stored as double-byte character
          with a zero big byte
          corresponds to mode "b" in ReadFile()
  • + Scripting got a new function.
      Name:     ReadFile
      Action:   Read data from file into string.
      Syntax:   readfile(filename, [mode])
      filename: file full path/name, or relative to current path mode:
        t: [default] text
           whether file is ASCII or UNICODE is auto-detected
        b: binary: raw bytes
           each byte is internally stored as double-byte character
           with a zero big byte
           corresponds to mode "b" in WriteFile()
      Examples:
        ::$a = readfile("test-in.txt");
          writefile("test-out.txt", $a);
          = Reads text from "test-in.txt" (ASCII or UNICODE) and writes
            it back to "test-out.txt" (ASCII or UNICODE).
        ::$a = readfile("test-in.txt");
          writefile("test-out-A.txt", $a, , "ta");
          = Reads text from "test-in.txt" (ASCII or UNICODE) and writes
            it back to "test-out-A.txt" in ASCII (1 byte per char).
        ::$a = readfile("test-in.txt");
          writefile("test-out-U.txt", $a, , "tu");
          = Reads text from "test-in.txt" (ASCII or UNICODE) and writes
            it back to "test-out-U.txt" in UNICODE (2 bytes per char).
    You can actually use ReadFile() and WriteFile() for file copying
    on a low level (bypassing the Shell):
      ::writefile("test-out.txt", readfile("test-in.txt"));
        = Copy "test-in.txt" to "test-out.txt" (text file).
      ::writefile("xy-out.png", readfile("xy.png", "b"), , "b");
        = Copy "xy.png" to "xy-out.png" (any file, binary or text).
  • * SC report(): Changed handling of line feeds.
    - Now, if the template is omitted, each line is terminated with
      a line feed (0x0D0A). Before, the last line was excluded from
      this.
    - Now, if you use a template, *you* are responsible for adding any
      line feed at the end of each line if you want to have one.
      Before, this was done automatically for all non-last lines.
      To add the standard Windows line feed (0x0D0A) you can use
      the internal variable <crlf>, or alternatively the functions
      chr(13) and/or chr(10).
  • ! It could happen (under quite rare circumstances) that Auto-Refresh was magically suspended. Fixed.
  • + Rename Special | Batch Rename: Since long, the self-referential wildcard (*) is replaced by the original file base (file title excluding extension). Now, there's a 2nd self-referential wildcard (?) that stands for the original file extension.
    Examples:
       Old    Pattern             New
      a.jpg ?                    jpg.jpg
      a.jpg *.?.bak /e           a.jpg.bak
      a.jpg ?-<#001>             jpg-001.jpg
      a.jpg *.?.<date yymmdd>    a.jpg.081023.jpg
      a.jpg *.?.<date yymmdd> /e a.jpg.081023
  • * Dialogs User | Manage Commands and Edit Copy/Move/Backup To... are now centered in screen. Before they were centered in the main window.

Tuesday, October 21, 2008

v7.70.0004 - 2008-10-21 14:41

  • + Scripting got a new function.
      Name:   WriteFile
      Action: Write data to file.
      Syntax: writefile(filename, data, [on_exist], [mode])
        filename: file full path/name;
                  will be created if does not exist yet
        data:     string data to write
        on_exist:
          o: [default] create new file/if existing: overwrite
          a: create new file/if existing: append
          n: create new file/if existing: do nothing
        mode:
          t: [default] text ASCII (1 byte per char);
             wide chars (upper Unicode) are represented by "?"
          u: utf16: 2 bytes per char; with LE BOM at file beginning
             LE BOM = Little Endian Byte Order Mark: 0xFFFE
          b: binary: raw bytes (also 2 bytes per char, but no BOM)
        return: 1 on success, 0 on failure
      Examples:
        ::$a = writefile("C:\Temp\test_A.txt", "text");
          Creates a 4 byte file.
        ::$a = writefile("C:\Temp\test_A2.txt", "text ".chr(20000));
          Creates a 6 byte file.
        ::$a = writefile("C:\Temp\test-U.txt", "text ".chr(20000), ,"u");
          Creates a 14 byte file (2 bytes BOM + 2 * 6).

    Note: WriteFile() is implemented as a function (instead of a statement) because the return value will be useful once If/Then blocks are implemented. You may, however, call functions without using a dummy variable. See here below.
  • + Scripting: Now you may call functions without caring for the return. For example,
      ::writefile("C:\Temp\test_A.txt", "text");
    instead of
      ::$success = writefile("C:\Temp\test_A.txt", "text");
    Internally, the dummy statement "call" is prepended:
      ::call writefile("C:\Temp\test_A.txt", "text");
    In step mode you will see the return of writefile() as argument of
    "call".
  • + Scripting: Comparisons now support the Like (LikeI) operator.
    General form:
      String Like Pattern (case-sensitive)
      String LikeI Pattern (case-insensitive)
    Where string is any string expression and Pattern may contain the usual wildcards and special chars used in XY patterns (*?#[]).
    Examples:
      ::echo "abc" Like "a*"; //1
      ::echo "Abc" Like "a*"; //0!
      ::echo "Abc" LikeI "a*"; //1!
      ::echo "It's " . (<date> Like "20??"?:"not ") .
        "the 21st century";

    Note that capitalization matters: "LIKE" or "Likei" won't work.
  • * File List: From now on, "Rename On Slow Double-Click" (menu View List Style) will only happen when no other than the clicked item is selected. This is a wonderful and relaxing detour from the Windows Explorer standard where clicking on any out of a bunch of selected files will enter rename mode -- did you really ever want this to happen??

Monday, October 20, 2008

v7.70.0003 - 2008-10-20 10:09

  • +++ File Find Contents: Now pattern matching is supported! This means you may enter wildcards * and ? in your content definition.
    Rules:
    - Since larger files are read chunkwise (performance!) there are
      certain limits to the scope of your pattern:
      A pattern "a*b" is guaranteed to be found if "a" and "b" are
      within a range of 1,024 bytes! It also *might* be found if "a"
      and "b" are within a range of 1,001 to 32,768 bytes! It will
      certainly not be found if "a" and "b" are only within an even
      larger range.
    - Just like with non-wildcard searches it is assumed that you look
      for a match anywhere within the file, so asterisks (*) are
      silently added to your pattern at both ends in case they are
      missing. This is just to spare you typing too many asterisks. So
      you may simply enter "D?g" to look for "D?g" anywhere in the file
      (match file contents with "*D?g*").
  • + Now you can define the default start location for a new tab. It's currently done as a tweak, but I'm ready to raise it to the GUI level if demand is there. For example:
      [Settings]
      StartPathNewTab=C:\
    Leave empty to use the location of the current tab.
  • ! SC Report(): Returned rubbish if Line Numbers column was invisible. Fixed.

Friday, October 17, 2008

v7.70.0001 - 2008-10-17 12:28

  • * Icon Overlays: Now they are only retrieved for local locations, not for network locations. Reason: Retrieving icons slows down network browsing even if there are no overlays to be found, and the latter is quite likely the case. If you do need Icon Overlays on network locations you can use the following new tweak:
      [Settings]
      ShowIconOverlaysOnNetwork=1
  • ! Menu File: The various "Copy Here with Suffix [...]" commands did treat folders with dots in the name as having extensions and inserted the suffix before the dot. Fixed.
  • ! XY variables and did not work as expected. Fixed.

Wednesday, October 15, 2008

v7.70.0000 - 2008-10-15 10:24

= NEW OFFICIAL RELEASE.
Main changes since last release:

  • +++ New Address Bar Deluxe with icons and optimized usability.
  • +++ Color Filters 2.0: Now you can define the *backcolor* of items.
  • +++ Unicode support is now complete for all parts of the application.
  • +++ Speed: Browsing folders and finding files got faster again.
  • +++ Scripting: Now with math, logic, and functions.

Sunday, October 12, 2008

v7.60.0052 - 2008-10-12 18:08

  • ! File List: Since v7.60.0025 - 2008-09-22 22:00 any current item (= item shown on Info Panel) lost its status of being current after a list refresh (F5, or by Auto-Refresh) under certain conditions. Fixed.
  • ! Rename Special | Set Extension: Prompted for a new extension when user passed an empty extension via UDC or scripting. Fixed: Now it just removes any current extension.
  • ! Rename Special | Set Extension: When an empty extension was applied to a file without any extension, the whole filename was attempted to be removed. Fixed: Now files without any extension remain untouched when you attempt to remove any extension.
  • ! Address Bar: With droplist visible the Browsing Tabs could steal away the mouse input capture with the unwanted effect that you could "click through" the list to the tabs below it. Fixed.