Smart Dropdown Buttons?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Filehero
Posts: 2731
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Smart Dropdown Buttons?

Post by Filehero »

Hi,

I expect this not to be a bug but proof of pure and total personal thumbness.

Anyway, if I paste this "code" from the helpfile

Code: Select all

   C:\
   <xy>
   <xypath>
into the CTBs left-click editor I get an "Overflow 0\0".

If I put the same lines into an text file (.txt) and point to that via

Code: Select all

:: load("E:\XYplorer\smartdropdown.txt");
I get an error message "Not found: Location or Item" where the displayed missing path is a concatenation of all 3 line-separated paths.

Since no one else cried yet, I'm quite sure there's no bug but me completely off-road.

Can someone give me the missing mental link?


Thanks & cheers,
Filehero

klownboy
Posts: 4462
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Smart Dropdown Buttons?

Post by klownboy »

Hi Filehero, I hope all is well. I put the 3 command lines in the left click edit of a new CTB and also in "run script" and it worked fine (the icons also appear). "Thumb" question but are you sure you have all the lines at the start of the line. I received error messages when I initially cut and pasted from your post because the commands were not at the beginning - ...not a valid script command. It's funny though that these short-cut menu versions don't accept the ";" semicolon at the end of the line. In a script, I did receive a location not found message if the commands were not at the beginning of the line. Take care,
Ken

Edit: I didn't initially see that you had a text file being loaded but that worked also.

Filehero
Posts: 2731
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: Smart Dropdown Buttons?

Post by Filehero »

Hi Ken,

turning my head to the right my eyes are spotting a castle surrounded by nicely colored autumn trees beautifully shining in the morning sun, my Windows 8.1 update went seamless, and I'm already having my second coffee. Yes, all is fine. :)

klownboy wrote: "Thumb" question but are you sure you have all the lines at the start of the line.
That's the thing to blame. OMG, I can't believe that I spent so much time without having a look at this. :roll: :oops: :veryconfused:

Did I write about thumbness?

You've made me click, thanks a lot. :D


Cheers,
Filehero

Filehero
Posts: 2731
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: Smart Dropdown Buttons?

Post by Filehero »

Follow up question:

How can I define run short-hands allowing parameters/arguments?

For instance, I would like to define a shortcut to run XY with the fresh option ideally including a caption, like

Code: Select all

"XY fresh" "<xy> /fresh"
. However, that statement generates a runtime interpeter error ('' is not a valid script command).

But also

Code: Select all

"<xy> /fresh"
does not work. The resolved path is shown in the menu, but the entry is greyed out.

This appears to be in contradiction to

Code: Select all

::run "<xy> /fresh";
which is the equivalent full-length run statement that works when put in the AB.

Single quotes don't work as well (they don't work at all).

:?:

Cheers,
Filehero

klownboy
Posts: 4462
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Smart Dropdown Buttons?

Post by klownboy »

After a number of tries with different quotes this finally worked.

Code: Select all

C:\
<xy>
<xypath>
"XY fresh|<xyexe>" run "<xy> /fresh"   //or use this line with a different-brighter-fresher icon [attached]
"XY fresh|<xyicons>\XY light.ico" run "<xy> /fresh";
Have a good weekend!
XY light.rar
Ken
To see the attached files, you need to log into the forum.

Filehero
Posts: 2731
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: Smart Dropdown Buttons?

Post by Filehero »

Hi Ken,

:o :shock: :ugeek:

You have become a real expert! Thanky you very much! :appl: :appl: :D :D

@Don: Maybe you could take Ken's sample code and add it to the manual?


Happy greetings,
Filehero

Filehero
Posts: 2731
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: Smart Dropdown Buttons?

Post by Filehero »

Heya Ken,

I'm still laughing at myself. :lol:

Anyway, with your help I've managed to setup my core-app launcher. So finally I have my core applications at portable hand when I'm logged into my admin account which is lacking any productive setup (pinned apps etc.).
I really do wonder, why I haven't noticed this handy XY feature by now.
smartdropdown.png
Some definitions

Code: Select all

// classs ids -> http://www.eightforums.com/tutorials/13591-clsid-key-guid-shortcuts-list-windows-8-a.html
// icons -> http://windows7themes.net/list-of-windows-7-icons-stored-in-imageres-dll.html#97-120
"Windows Update|%windir%\System32\wuapi.dll / 1" run "explorer shell:::{36eef7db-88ad-4e81-ad49-0e313f0c35f8}"
"Administrative Tools|%windir%\System32\imageres.dll / 110" run "explorer shell:::{D20EA4E1-3957-11d2-A40B-0C5020524153}"
"Windows Defender|%programfiles%\Windows Defender\EppManifest.dll / 1" run "control.exe /name Microsoft.WindowsDefender"
"File History|%windir%\System32\imageres.dll / 280" run "explorer shell:::{F6B6E965-E9B2-444B-9286-10C9152EDBC5}"
-
"XY fresh|<xyicons>\XYplorer.ico" run "<xy> /fresh"
Thanks again for your help, very appreciated. :D


Cheers,
Filehero
To see the attached files, you need to log into the forum.

klownboy
Posts: 4462
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: Smart Dropdown Buttons?

Post by klownboy »

Thanks Filehero. It is amazing all the nice things you can do with XY scripting and menus. If you want to go hog wild with menus and sub-menus, did you happen to see my example I displayed here http://www.xyplorer.com/xyfc/viewtopic. ... =15#p93665- a menu and sub-menu system all done with one XY script?
By the way did you install 8.1 yet? I didn't myself yet. I'm waiting to have a bit more free time, just in case, and I want to do another disk image beforehand.
Thanks,
Ken

Filehero
Posts: 2731
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: Smart Dropdown Buttons?

Post by Filehero »

klownboy wrote:, did you happen to see my example I displayed here http://www.xyplorer.com/xyfc/viewtopic. ... =15#p93665- a menu and sub-menu system all done with one XY script?
The main menu in your post actually was the final kick-ass to me. Usually, I have pinned all my daily stuff to the task bar and don't like to have tons of super-duper launchers.
But during updating win 8.1 I realized it would be extremely handy if I could get quick access to a set of tools just from XY.
From my layout manager I know that the submenus aren' real submenus that fly-out but fake popups and the setup takes some time. But the smart dropdown buttons are perfect for this. :)
klownboy wrote:By the way did you install 8.1 yet? I didn't myself yet. I'm waiting to have a bit more free time, just in case, and I want to do another disk image beforehand.
Yes I did, and it was actually straightforward. I just had to reinstall my Steinberg audio driver infrastructure and had to deactivate Hyper-V (because that captures away all cpu virtualization from tools like CPU-Z and virtualbox).
To my surprise the updated freed about 10 GBs from home drive (I think it's more or less a complete new install + user data migration).
What is downright awkward is the fact that Microsoft offers no real iso officially. So each update starts on Windows 8 with the download from the store (which I happened to do today in order to analyse the virtualization hickups).

I like it very much.


Cheers,
Filehero

Post Reply