Page 1 of 1

Preview

Posted: 30 Sep 2013 19:19
by oblivion
I'm trying to make a series of scripts that will switch XYPlorer into specific layouts / workspaces, depending on what I'm using it for.

One of my workspaces wants the preview panel to be open. I can use button "preview" to toggle it but I can't find a way to turn it on or leave it on if it's on already -- and of course ensure it's off if I'm designing a workspace that doesn't want it!

Is this possible with a script command I've failed to find, or do I have to try to find a way to determine its current state and act accordingly?

Re: Preview

Posted: 30 Sep 2013 19:24
by Filehero
[quote="oblivion"]I'm trying to make a series of scripts that will switch XYPlorer into specific layouts / workspaces, depending on what I'm using it for.[/quote]You may want to have a look in here (taking the makes-really-everyone-happy-approach) as well as the link in my signature. :whistle:


Edit: Stupid me, next time I read more carefully. :oops:

Could it be it's command 665 you're after?

Code: Select all

msg(get("#665"));
Cheers,
Filehero

Re: Preview

Posted: 30 Sep 2013 23:31
by oblivion
Filehero wrote: Edit: Stupid me, next time I read more carefully. :oops:
Well, the first answer might be a way to avoid me reinventing the wheel -- although I think I've learned more trying to solve this one problem than I had up to now doing other things. :)
Could it be it's command 665 you're after?

Code: Select all

msg(get("#665"));
It might be -- although the info panel might not always start with preview as the in-view pane?

Hm. Now I know where to look... aha. #1023 does it. But how to close it again...

Thanks anyway -- I'm getting closer to the answer than I was before!

Re: Preview

Posted: 30 Sep 2013 23:50
by highend
But how to close it again..

Code: Select all

    if (get("#665") == 0) {
        #1023;
    } else {
        #665;
    }

Re: Preview

Posted: 01 Oct 2013 12:23
by oblivion
I've had a bit of a play with LayoutManager.

The good stuff: it manages things I hadn't got into trouble with yet (but inevitably was going to) like the Catalog and the Mini Tree.

The bad stuff: it doesn't seem to save the active tabset with the rest of the layout, and it doesn't save the toolbar either.

The VERY bad stuff: I've deleted the minimalistic layout so I don't end up using it again accidentally. (I couldn't remember how to exit without saving, panicked, exited anyway in the hope that All Would Be Well and then, when it wasn't, and I couldn't work out how to run the script without the menu or the toolbar, had to hack xyplorer.ini to get things back to normal.) :oops:

So now I'm in a bit of a quandary. Do I try and convince FileHero (clearly a person with programming skills I'll never get close to) to add more functionality to LayoutManager, or do I ditch LM again and go back to reinventing wheels?

Re: Preview

Posted: 01 Oct 2013 12:50
by Filehero
oblivion wrote:So now I'm in a bit of a quandary. Do I try and convince FileHero (clearly a person with programming skills I'll never get close to) to add more functionality to LayoutManager, or do I ditch LM again and go back to reinventing wheels?
No, try the SessionManager I had referenced in my first Link, and which I use all the time for my workspaces (didn't want to reinvent a wheel, as well). :wink:

The "minimalistic" thingie I have introduced to enforce myself to learn all those important shortcuts, e.g. <ctrl>+<F12> to toggle the toolbar.


Cheers,
Filehero

Re: Preview

Posted: 01 Oct 2013 15:15
by oblivion
Filehero wrote:No, try the SessionManager I had referenced in my first Link, and which I use all the time for my workspaces (didn't want to reinvent a wheel, as well). :wink:
Clearly it's not only you who don't always read things properly. ;) I missed that -- I'll take a look.
The "minimalistic" thingie I have introduced to enforce myself to learn all those important shortcuts, e.g. <ctrl>+<F12> to toggle the toolbar.
Mm. Not -- I discovered -- if you're running CintaNotes. (A wonderful little notekeeping program, it uses ctrl-F12 to make a new note with the currently highlighted text, if any, or just a blank one if not. Which isn't helpful if minimalistic is in use. :D )

XYP is perhaps a little too polite about its hotkeys, since it apparently doesn't complain if something else is already using something it wants to use. Probably just as well, in some ways, but it probably means I should pay a bit more attention to where conflicts occur and find alternatives.

Re: Preview

Posted: 01 Oct 2013 15:39
by klownboy
Hey oblivion,
One of the most convenient things I've done in XY is assign both a keyboard shortcut and a CTB for establishing my desired conditions with the menu, toolbar, address bar, preview, navigation panel, etc. If I get into a situation like a minimalistic view, which I do frequently with CTB scripts set-up to view photo collections or wallpaper thumbnails, I can easily get out to a "normal view". That keyboard shortcut (e.g., some numpad key I'd never use) and CTB get used more than any other script. Something very simple like this, which you'd adjust to suit your own favorite layout conditions:

Code: Select all

    #352;                                              //close all "other" unlocked tabs
    if (tab("get", "flags") == "") {tab("close", 1)}   //close the current selected tab if it's unlocked        
//the above lines might be useful also if you have a bunch of unlocked tabs and want to close them as part of your clean-up/getting back to a desired state 
   #552;#1040;goto "C:\";
    if get(#660) {#660;}    // Address Bar
    if !get(#661) {#661;}   // Tool Bar
    if !get(#662) {#662;}   // Tab bar
    if !get(#663) {#663;}   // Nav Pnl
    if !get(#664) {#664;}   // Catalog
    if get(#665) {#665;}    // Info Pnl
    if !get(#670) {#670;}   // Status Bar
    if !get(#1061) {#1061;} // Menu Bar
    if get("#800") {#800;}  // Dual Pane
I even have AutoHotkey scripts which will run the XY script or will start XY if it's not already.

Re: Preview

Posted: 01 Oct 2013 20:27
by Filehero
oblivion wrote: -- if you're running CintaNotes.
No. Same with AutoHotkey of which I know from the champs around here that it is another abolute winner in terms of tailoring your machine to your very personal need and workflow. I can't explain for sure, but I gues it's due to the fact that it took me ages to memorize all those standard windows shortcuts. On top of that I still have some hard times to remember the ones for XY, Lightroom, Notepad++, Photoline, my Homebanking application, Cubase etc. :mrgreen:
oblivion wrote:XYP is perhaps a little too polite about its hotkeys, since it apparently doesn't complain if something else is already using something it wants to use.
Hmm, this is by design, isn't it? XY can't sense them if a "competitor" tool has established a hook in the Windows event chain upstream to XY and catches and consumes the hotkeys. At least, unless that tool is repropagating the very same shortcuts down the line after its processing job is done.


Cheers,
Filehero

Re: Preview

Posted: 01 Oct 2013 20:49
by Filehero
Heya Ken,
klownboy wrote:One of the most convenient things I've done in XY is assign both a keyboard shortcut and a CTB for establishing my desired conditions with the menu...

Code: Select all

   #552;#1040;goto "C:\";
    if get(#660) {#660;}    // Address Bar
                          ....
    if get("#800") {#800;}  // Dual Pane
Sometimes elegant solutions are so plain simple. Cool. :)


Another possible way: Make all important or "rescue" scripts also available from the Catalog, then <ctrl>+<F8> is the "only" combination you have to remember.


Cheers,
Filehero

Re: Preview

Posted: 09 Oct 2013 08:47
by oblivion
oblivion wrote:
Filehero wrote:No, try the SessionManager I had referenced in my first Link, and which I use all the time for my workspaces (didn't want to reinvent a wheel, as well). :wink:
Clearly it's not only you who don't always read things properly. ;) I missed that -- I'll take a look.
It's just occurred to me that I need to come back to this and mention the fact that SessionManager is EXACTLY what I wanted. Absolutely marvellous. It has already become indispensable.

Re: Preview

Posted: 09 Oct 2013 09:23
by Filehero
oblivion wrote:... is EXACTLY what I wanted. Absolutely marvellous. It has already become indispensable.
Same here - rendered my own script practically unused. :lol:


Cheers,
Filehero