Expandable drive button

Discuss and share scripts and script files...
klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Expandable drive button

Post by klownboy »

Hey serendipity,
Concerning my pervious post, more precisely the edit section of the post, it really wasn't directly related to Filehero's issue just something that came up again using the "/flg=2" parameter. If you would (if you haven't already), please try my 2 entries (in the Edit section above) in the AB and see if you notice a difference running the two (i.e., with the first line which does not use the "cmd", I receive an hour glass wait which last 4 or 5 seconds even after the message displays though it doesn't slow down the message from appearing. Whereas using "cmd" to run XYplorer, the message displays just as fast and with out the annoying hourglass cursor. It just seems odd that the code using "cmd" runs better than the one without it. This is what I was referring to in possibly questioning Don about why that is...unless this issue is specific to my installation (good grief), but I do know its happens on other uses of /flg=2 w/o "cmd".

Hi Filehero, sorry we haven't been able to help much. It appears to be a installation/configuration specific issue unfortunately. Thanks for the kind words and good luck.
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Expandable drive button

Post by Filehero »

Hi Ken,
klownboy wrote:Hi Filehero, sorry we haven't been able to help much. Ken
Wrong, all of you have been helping me a lot indeed. :D

Filehero

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Expandable drive button

Post by serendipity »

klownboy wrote: Running the following line in AB works, but gives me the hourglass for a number of seconds.

Code: Select all

::run "<xy> /script=""::msg 'Hi!';"" /flg=2", , 0,0;
OK, now it worked for me, had to add extra quotes for paths with spaces:

Code: Select all

::run """<xy>"" /script=""::msg 'Hi!';"" /flg=2", , 0,0;
Yes, don't understand the wait.

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Expandable drive button

Post by klownboy »

Hi serendipity, Thanks for checking that for me. So, it isn't just me or my system which is good to know. Maybe when Don's not so busy with BC and other things I'll have him do the same check to see if he know why using the "/flg=2" parameter results in the wait cursor. It's odd because it doesn't appear that it is truly holding anything up or really waiting so-to-speak. In this example, with the wait cursor active, if you immediately hit the "OK" button in the "Hi" dialog box, the dialog box goes away - there's no hesitation - just as I've found in other cases where I've used /flg=2.
Thanks again,
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Expandable drive button

Post by Filehero »

Hi,

sequel to this post.

After going through all XY ini sections constituting 1440 lines in total, doing way more than 100 XY 'Restart without Saving' I think I got it!

With a fresh XY ini I could invoke the problem of a popping second XY instance by replacing the original setting

Code: Select all

TitlebarTemplate="<path> - <app> @ <ini> - <ver>"
with my customized one

Code: Select all

TitlebarTemplate="<xypath>:<app> (<ver>)   |   <path>"
A couple of dozens minutes ( :lol: ) later I've isolated the following combinations of values for the title bar.

Harmless

Code: Select all

<xypath>:<app> @ <ini> | <ver>
<xypath>:<app> <ini> | <path>
<xypath><ver>
:<ver>
<ver>
. :<ver>
<app> <ver>
<ver> <app>
<app>
EVIL

Code: Select all

<xypath>:<app> @ <ver> | <ver>
<xypath>:<app> <ver> | <path>
<xypath>:<app> <ver> |
<xypath>:<app> <ver>
:<app> <ver>
:<app><ver>
<app><ver>
<ver><app>
AAAAAA<ver><app>BBBBBBB
:shock: :shock:

The only pattern I can see so far is, that <app> and <ver> are required in the constitution the problem. I still think it's abolutely strange that a window title is involved, but I have done enough tests and controls.


Now I want to know: is it reproducible for you?


Cheers,
Filehero

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Expandable drive button

Post by serendipity »

Filehero wrote: EVIL

Code: Select all

<xypath>:<app> @ <ver> | <ver>
<xypath>:<app> <ver> | <path>
<xypath>:<app> <ver> |
<xypath>:<app> <ver>
:<app> <ver>
:<app><ver>
<app><ver>
<ver><app>
AAAAAA<ver><app>BBBBBBB
Now I want to know: is it reproducible for you?


Cheers,
Filehero
Bravo!! :appl:
Yes, I could reproduce. It opens a new instance on clicking the drive button. I stopped after trying the first evil one:

Code: Select all

<xypath>:<app> @ <ver> | <ver>

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Expandable drive button

Post by Filehero »

serendipity wrote:Bravo!! :appl:
Yes, I could reproduce. It opens a new instance. I stopped after trying the first evil one:

Code: Select all

<xypath>:<app> @ <ver> | <ver>
Thanks for confirmation of this bugger, opening a ticket now. :)

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Expandable drive button

Post by klownboy »

Very good Filehero you nailed it down. I was able to reproduce the 2nd instance coming up as well with your evil templates. I've always had: <app> <ver> with a space between the two and no colons or pipes and it wasn't happening to me. So, I tried my original <app> <ver> without an space and low and behold as your evil lists suggests, the 2nd instance displays. If I had a colon between the <app> and <ver> and no spaces, no problem, but if I put a pipe between them evil. Very odd isn't it?
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Expandable drive button

Post by Filehero »

Hi Ken,
klownboy wrote:Very odd isn't it?
Indeed, expecially because of the difference a single space makes. :veryconfused:

Moreover, I never had expected a label, which I guess is a constant value internally, to interphere with script self-feeding. And I am happy to could have nailed it, it was really starting to haunt me. Yeah, software can be really funny sometimes. :lol:

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Expandable drive button

Post by Filehero »

Hi serendipity,

me again.

Wow, that's a great solution all of you have designed. :appl:

During my bug hunt I may have corrupted something since I have noticed that upon expansion the right neighbour of the collapsed button is missing (back button in my example).

Collapsed
EDB_collapsed.png
EDB_collapsed.png (1.96 KiB) Viewed 3582 times
Expanded
EDB_expanded.png
EDB_expanded.png (1.17 KiB) Viewed 3582 times
I quickly had a look at the code but line 39

Code: Select all

$newtoolbar=replace($toolbar,"$curctb,","$curctb,{drives_fix},-") ;
seems ok. Any idea where else to look?


Thanks,
Filehero - happy button expander :)

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Expandable drive button

Post by serendipity »

Thanks Filehero. Indeed that code was wrong, commas were missing in two places and caused problems. Fixed it now.

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Expandable drive button

Post by Filehero »

serendipity wrote:Fixed it now.
Fix confirmed, thanks.

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Expandable drive button

Post by klownboy »

A little strange, the missing 2 commas was not affecting my modified version for whatever reason. I tried the script with and without the commas with the same result - no missing neighbor to the right. Maybe because I was spelling out specific CTBs to expand as opposed to expanding drives. I made the changes anyway just in case.
Thanks serendipity and Filehero.
Ken
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Filehero
Posts: 2644
Joined: 27 Feb 2012 18:50
Location: Windows 10 Pro x64

Re: Expandable drive button

Post by Filehero »

Hi,

Don was fast and genious like always.

Code: Select all

v13.10.0135 - 2013-10-26 13:47

    + Command Line Switches: Added switch /hwnd. If feeding a script
      into XYplorer you can pass the window handle of the target
      XYplorer instance with this switch if you know it. If you want to
      feed the script into this XYplorer, you can simply use the
      variable <hwnd>, for example:
        run "<xy> /script=""::msg 'Hi!';"" /flg=2 /hwnd=<hwnd>", , 0, 0;
      But, of course, to run this script in this XYplorer you could also
      simply do this:
        msg 'Hi!';
I've already added the /hwnd=<hwnd> switch in my local version This sort of a this-pointer works like charm: my old window title is back. :)


Cheers,
Filehero

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Expandable drive button

Post by serendipity »

Filehero wrote:Hi,

Don was fast and genious like always.
Indeed! :appl:
Added /hwnd=<hwnd> in the code and updated first post.

Thanks Filehero for tracking this down.

Post Reply