Page 2 of 4

Re: Laycat: simple picker for layouts and catalogs

Posted: 30 Jun 2014 22:10
by aurumdigitus
Since Filehero gave Laycat to the world it has become a much used CTB. Then when Columns was added thought - to use an old TV tagline - "It just don't get no better". Now if klownboy melds Toolbars into the script will need to find some new superlative to cover what by any reasonable definition is a utility that is an adjunct to XY. :appl:

Re: Laycat: simple picker for layouts and catalogs

Posted: 01 Jul 2014 02:20
by klownboy
I finally gave this Toolbar addition to Filehero's LayCat enough testing on 2 computers to where I'm satisfied to post. It should look like my earlier post on June 28, 2014. This script (LayCatTools.xys) will give you the option to load and save toolbars in addition to the catalog, layouts, and column layouts on Filehero's script. I also included save menu items for the layouts and catalog.

Please do not create a folder called toolbars off the <xydata> folder. Why? Because this script will do that on it's first run and at the same time, it will then save the "current" toolbar you're using in that folder. So you should see it in the Toolbar section of the menu. The "current" or last accessed toolbar will be flagged as you can see. If your computer does not display the symbols as shown in my image, you may have to change them to something more standard (e.g., and asterisk, a dash extra, etc.). Always have an updated backup of XYplorer.ini as a pre-caution.

Please let me know if you experience any issues. I've included the icons shown in the image which are not XY's built-in ones, but you'll to update the icon/icon locations within the script. Just play around and save a new toolbar...and then see how fast and seemless it is to change toolbars. Don should really build it in to XY.

Thanks Filehero for the nice script and letting me toy with it a little. Thanks to Sammay for your help with "last accessed" file and also to Stefan for all his previous work with Toolbars (I mentioned his posts earlier in this thread). I may include rename and delete options later, but for now you can simply go to the folder and rename delete any toolbars or layout you want since they're just text files.
Ken
LayCatTools.zip
(15.84 KiB) Downloaded 499 times

Re: Laycat: simple picker for layouts and catalogs

Posted: 01 Jul 2014 04:15
by Enternal
klownboy wrote:Thanks Filehero, I'm not planning on retiring your Layout Manager or Session Manager just yet though. One is a right click of a CTB and the other the left.
Ken
Hahaha! I have to admit that too. I don't plan on retiring those 2 scripts yet. They're still too awesome in many ways. Layout manager especially since I can easily switch to different layouts depending whether I want to view pictures (needs lots of space) or file managing (need lots of info and stuff all over the place). Session Manager is too awesome as well.

That however does not mean I won't add this script to my use. :biggrin:

Thanks!

@ Klownboy
Just to note but on line 135, you still have the icons being referenced to:
"Save Toolbar|D:\Graphics\Icons\Combined\Customize Toolbar on.ico";
rather than:
"Save Toolbar|<xyicons>\Customize Toolbar on.ico";

Re: Laycat: simple picker for layouts and catalogs

Posted: 01 Jul 2014 12:38
by klownboy
Enternal wrote:Just to note but on line 135, you still have the icons being referenced to:"Save Toolbar|D:\Graphics\Icons\Combined\Customize Toolbar on.ico";rather than:"Save Toolbar|<xyicons>\Customize Toolbar on.ico";
Hi Enternal, on my system I do actually have a few folders off of my the main <xyicons> folder which is "D:\Graphics\Icons" , one being "Combined" (for combined 16 and 24 size icons). I had that folder for icons long before XY so I changed the XY pointer for <xyicons> to that folder since many other programs used that folder as well. I'll change it to simply <xyicons> for the posted version though so I don't confuse people making tweaks to the icons and locations.

Let me know if you have any issues.
Thanks,
Ken

Re: Laycat: simple picker for layouts and catalogs

Posted: 01 Jul 2014 14:33
by bdeshi
Hi, there's a comment about XY auto-picking single-item menus. I'd like to mention that I've generally gotten around this issue by adding a separator to the menu ( XYskinner :whistle: adds one by default, but a more sensible approach is a conditional separator added only when menu items are < 2)

Re: Laycat: simple picker for layouts and catalogs

Posted: 02 Jul 2014 13:19
by Enternal
@ Filehero & klownboy
I borrowed your script to make it display PaperFolders. Saves 2 extra clicks instead of the usual 4 using Don's menu. Heh.

Code: Select all

  $ICO_LAYOUT = "<xyicons>\Layout_01.ico";
  $DISASTER_MSG = "You don't have at least one saved Paper Folder!<crlf><crlf>Quiting now.";
  $DIR_PAPER = "<xydata>\Paper";

  // Gather menu entries
  $Papers = "";
  //Layout section: Prepare list from files names of saved layouts
  If (Exists($DIR_PAPER) == 2) {
    $Papers = ListFolder($DIR_PAPER, "*.txt", 5);
    $Papers = Replace($Papers, ".txt", "");
  }

  // Exit if nothing is to pick
  If (!$Papers) {
    Msg($DISASTER_MSG);
    End(1);
  }

  // Build and assemble menu
  $Papermenu = "";
  If ($Papers) {
    Foreach ($Item, $Papers, "|") {
      $Papermenu = $Papermenu . "  * $Item"<crlf>;
      $Papermenu = $Papermenu . "  Goto paper:$Item;<crlf><crlf>";
      //$Papermenu = $Papermenu . "  PaperFolder(""$Item"", , , "l");<crlf><crlf>";
    }
	$Papermenu = """PAPERS|$ICO_LAYOUT""" . ";" . "<crlf>" . "$Papermenu";
  }

  $MScript = $Papermenu;
  $MScript = $MScript;
  Load($MScript, , s);

Re: Laycat: simple picker for layouts and catalogs

Posted: 02 Jul 2014 13:28
by Filehero
Enternal wrote:@ Filehero & klownboy
I borrowed your script to make it display PaperFolders. Saves 2 extra clicks instead of the usual 4 using Don's menu. Heh.
:)

Cool, I like choices and flavors. :D


Cheers,
Filehero

Re: Laycat: simple picker for layouts and catalogs

Posted: 02 Jul 2014 13:57
by klownboy
@Enternal, yes, that is cool. I'm tempted to build it into the LatCatTool menu so they're all together, but possibly it would make it too long especially for smaller displays when someone has a bunch of menu items. :?:
Thanks,
Ken

Re: Laycat: simple picker for layouts and catalogs

Posted: 03 Jul 2014 05:13
by Enternal
klownboy wrote:@Enternal, yes, that is cool. I'm tempted to build it into the LatCatTool menu so they're all together, but possibly it would make it too long especially for smaller displays when someone has a bunch of menu items. :?:
Thanks,
Ken
Yeah I think it might be better to be separate since it's not really related to layouts anyway. Anyway, fixed a couple more things, add ability to delete Paper Folders directly without navigating to the folder!, use a different method that was recently fixed by Don, and some other things I forgot. Kind of fun messing with it actually.
Menu.png
Menu.png (10.36 KiB) Viewed 7312 times
Delete.png
Delete.png (32.23 KiB) Viewed 7312 times
Had an issue with heredoc not taking "<crlf>" as a literal even when I was using single quotations. Wonder how I can get that to work.

Code: Select all

  $Savemen = <<<SAV
"Toggle Paper Folder|:paper" #778;
"Delete Paper Folder|:del" InputSelect("Paper Folder".'<crlf>'."Select to Delete:", "$PapersFile");
SAV;
  $MScript = $Savemen;
  Load($Savemen, , s);
Anyways, if this script is good enough, I might as well as make a new thread just to post it in... or not. Feeling lazy now haha. Anyway thanks to your script, it made my work easier!

Re: Laycat: simple picker for layouts and catalogs

Posted: 03 Jul 2014 06:30
by Stef123
Great script :D - more comfort than the "real" thing - except for the right-click options (Allow Zombies etc). Is there a way to attach those to the CTB's right-click?

Re: Laycat: simple picker for layouts and catalogs

Posted: 03 Jul 2014 11:09
by Enternal
Stef123 wrote:Great script :D - more comfort than the "real" thing - except for the right-click options (Allow Zombies etc). Is there a way to attach those to the CTB's right-click?
I don't know yet. Those other options that I used were used just because they were actually under the Menu items so that means they have command IDs I could use. For the zombies, not so much.

Re: Laycat: simple picker for layouts and catalogs

Posted: 03 Jul 2014 11:22
by Stef123
@Enternal - Not sure I understand. Let me put it another way, as a more generic question: Is there a way to assign the existing right-click menu of a built-in TB button to the the right-click action of my CTB?

I have learned to assign the XY left-click to my right click via "button "paper"
But how do I bring in the XY right-click?

Re: Laycat: simple picker for layouts and catalogs

Posted: 03 Jul 2014 11:30
by Enternal
Stef123 wrote:@Enternal - Not sure I understand. Let me put it another way, as a more generic question: Is there a way to assign the existing right-click menu of a built-in TB button to the the right-click action of my CTB?

I have learned to assign the XY left-click to my right click via "button "paper"
But how do I bring in the XY right-click?
Oh! Sorry I misunderstood you. I thought you meant adding the ability to toggle the "Allow Zombies" setting for papers in the script.

As to the answer you're actually looking for is: I don't think so. Although that does seem like a nice feature if you can assign the output of the built in toolbar menus into a custom toolbar. In this case, it would save an extra space.

Re: Laycat: simple picker for layouts and catalogs

Posted: 03 Jul 2014 11:34
by LittleBiG
Stef123 wrote:I have learned to assign the XY left-click to my right click via "button "paper"
But how do I bring in the XY right-click?
button "paper", 2

Re: Laycat: simple picker for layouts and catalogs

Posted: 03 Jul 2014 11:36
by klownboy
Enternal wrote:Had an issue with heredoc not taking "<crlf>" as a literal
Funny, I asked the same question here http://www.xyplorer.com/xyfc/viewtopic. ... 35#p107371and the answer from Sammay was, "you can use chr(13) instead of <crlf>, which seems to survive". He was absolutely correct. In my case with "LayCatTools", I didn't need the problem line in the heredoc so I didn't need to use it in the final script but I did test it and it does work - it does survive.

Stef123, yes, just was the button command with button name and then "2" for right click (e.g., button "minitree", 2;) and put that in the right click for the CTB. For the name use the abbreviated name in [brackets] as shown in Customize Toolbar, fp for Floating Preview
Ken