Painless Custom Toolbars (No Morphine/Tourniquets Required)

A collection of especially useful xplorer² topics and ideas. New users may find it helpful to look here before searching the other forums for information. >>>>>> Please post new material in the relevant forum. (New stuff posted here will be removed.) Thanks. -fg-

Moderators: fgagnon, nikos

User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1255
Joined: 2005 Oct 16, 19:09

Re: Painless Custom Toolbars (No Morphine/Tourniquets Required)

Post by FrizzleFry »

I am getting this error

---------------------------
AutoIt Error
---------------------------
Line 15956 (File "C:\tools\x2tools\x2Toolbar32_x64.exe"):


Error: Subscript used on non-accessible variable.
---------------------------

when running x2Toolbar32_x64.exe from a toolbar button.

The error happens when I pick the toolbar.

This was the button's original command line:
>C:\tools\x2tools\x2Toolbar32_x64.exe /Menu /Plain

I also tried these:
>C:\tools\x2tools\x2Toolbar32_x64.exe /Menu
>C:\tools\x2tools\x2Toolbar32_x64.exe
but get the same error.

Running from address bar works though. Also double-clicking the exe file works

I have not run x2Toolbar32_x64 in a while so I'm not sure if this started with v6 or before.
Kilmatead
Platinum Member
Platinum Member
Posts: 4842
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: Painless Custom Toolbars (No Morphine/Tourniquets Required)

Post by Kilmatead »

FrizzleFry wrote:Running from address bar works though. Also double-clicking the exe file works
You know, had you just waited 17 days it would have been exactly 7 years since this was last updated. Symbolism matters. Sometimes I feel like a reborn cannibalistic Mayan with dysentery, especially when I revisit things I barely remember writing. :D

That said, try the link on the first post again, I updated it to 2.0.5 as I do vaguely remember some odd issues that Win10 had with it and Win7 didn't, which is always the way. If you're using Win11 (speaking of the bloody-flux!), all bets are off and I can't test anything with that.

I can't recreate your issue, even using the /Menu /Plain delimiters (how did I even think to include them years ago?), and it doesn't have anything to do with x2 v6 or even the crumbs/addressbar thingy, which was my first thought (on or off).

Considering it works for you from double-clicking (the complex thing was the funky graphical toolbar selection routine, as I recall), I have no explanation. Hopefully the gods will like the 2.0.5 sacrifice better?
User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1255
Joined: 2005 Oct 16, 19:09

Re: Painless Custom Toolbars (No Morphine/Tourniquets Required)

Post by FrizzleFry »

I get the same error with the new one except for the line number:

---------------------------
AutoIt Error
---------------------------
Line 17428 (File "C:\tools\x2tools\x2Toolbar32_x64.exe"):


Error: Subscript used on non-accessible variable.
---------------------------

I also get the error if I run x2Toolbar32 from the user command list or from a Menu++ command.

I am running Windows 10 on my current main PC but my newish PC has Windows 11 and I get the same error there.

Since you can't recreate the issue it's probably some x2 setting or something else I'm running. I'll let you know if I figure out what's causing it.
Kilmatead
Platinum Member
Platinum Member
Posts: 4842
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: Painless Custom Toolbars (No Morphine/Tourniquets Required)

Post by Kilmatead »

The part that confuses me is that you say it works if you just click the EXE (or run from the addressbar)... that doesn't make any sense as it (obviously) has no idea how it's being invoked. I certainly have no influence over the user-command-list window itself...

Try using the "/NoMove" switch on your command, that should squelch any influence the mouse position/re-positioning might have, based on the thought that the toolbars and the menu are all at the top of the screen, maybe that has something to do with it, given mouse-pos + screen-coordinates can be array challenging...

In an attempt to overload the array I did discover a "bug" in x2 itself: x2 is happy to create up to 12 toolbars but if you try and create 13 x2 itself crashes. But my thingy had no problem with 12 bars, executed from a toolbar button itself.

I don't like bugs I can't recreate and yet are obviously there. :? As it's half-two in the morning and I've got one IDE open with a C project, and another open with this AutoIt thing (which, frankly, I'm a bit rusty at), my brain is turning to mush.
User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1255
Joined: 2005 Oct 16, 19:09

Re: Painless Custom Toolbars (No Morphine/Tourniquets Required)

Post by FrizzleFry »

It was the damn pop-up info messages that were causing the problem! One of the new features in v6.
I disabled then from the advanced settings editor by searching for caption in global settings.
I guess it was working from address bar and double-clicking because they do not cause a pop-up message.

You can ignore all this rambling below now.

I still get the error using /NoMove when running from toolbar button.

I removed all x2 settings so I could test with a clean instance but I still get the error.
So it does not seem to be any of my x2 settings that is causing this error.

I'll try creating a clean install VM to see if it works there.

I agree that it is weird that it works from address bar and by double-clicking but not from toolbar button or user command list.

I ran x2 5.5.0.1 with clean settings and with my regular settings and x2Toolbar32 works from toolbar button.
So it seems that it is x2 v6 that is causing the problem for me.