[Script] CTBToolTipTitle

Discuss and share scripts and script files...
Post Reply
klownboy
Posts: 4402
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440

[Script] CTBToolTipTitle

Post by klownboy »

The idea of this script is to simply make it easier to provide separate action titles and tooltips for the left and right click of a CTB, each on a separate line. Not a big deal obviously, but it is clearer and easier to see and remember the actions assigned to the left and right buttons when the title / tooltip appear on a separate line. Even more so when additional actions are assigned using a modifier key or you have a left or right drag and drop assigned to the CTB as well.

If the script is assigned to a CTB, a left click of the CTB will allow you can edit the title as described above. If you right click the CTB, that CTB's Edit User Button menu will be displayed. If the script is invoked by some means other than a CTB like "Load Selected Script file" or "Load Script file...", only the Title/tooltip mode is available. To keep the list manageable, this version permits editing any of the currently in-use CTBs (currently on the toolbar). A listing of all your in-use CTBs will be displayed, simply select one and rewrite the CTB title as you see fit. Place a '|' between your title tooltips assigned for the left and right clicks of the CTB. I have another version which will permit editing of all CTBs whether they exist on the TB or not (available on request).

Thanks to TheQwerty for EditUserButton portion of the script and thanks to Sammay for giving me the idea.
CTBTooltipTitle_menu portion.JPG
CTBTooltipTitle_menu portion.JPG (21.97 KiB) Viewed 1378 times
CTBToolTipTitle.zip
(2.3 KiB) Downloaded 176 times
Attachments
CTBToolTipTitle_3_examples.JPG
CTBToolTipTitle_3_examples.JPG (27.63 KiB) Viewed 1378 times

eil
Posts: 1824
Joined: 13 Jan 2011 19:44

Re: [Script] CTBToolTipTitle

Post by eil »

Pretty useful script!
I just wonder why direct use of <crlf> in name field doesn't allow same results = i actually tried before and thought there is no way for multiline tooltips. :eh:
Win 7 SP1 x64 100% 1366x768|1900x1080

admin
Site Admin
Posts: 65119
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [Script] CTBToolTipTitle

Post by admin »

v28.00.1216

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

Re: [Script] CTBToolTipTitle

Post by klownboy »

Thanks Don. That makes it easier for anyone. The script still works thankfully. The new line required a "¶ " (paragraph symbol followed by tab) and that result is seen in the XYplorer.ini file when accomplished by the script. Now only "<crlf>" is nessesary and the <crlf> is shown in the ini file.

eil
Posts: 1824
Joined: 13 Jan 2011 19:44

Re: [Script] CTBToolTipTitle

Post by eil »

klownboy wrote: 10 Dec 2025 14:55 The new line required a "¶ " (paragraph symbol followed by tab) and that result is seen in the XYplorer.ini file when accomplished by the script. Now only "<crlf>" is nessesary and the <crlf> is shown in the ini file.
Oh, so it was more complex than mere <crlf>, didn't check the INI storing format.
Nice it works simpler now, yet script is still useful, as it presents all visible CTBs for edit.
Win 7 SP1 x64 100% 1366x768|1900x1080

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

Re: [Script] CTBToolTipTitle

Post by klownboy »

I guess it's been too long. I looked at the script again and it does use the variable $return = '<crlf>'; in SC ctbname, and it gets converted to "¶ " in the ini file. For example for a 2 line tooltip:
ctbname(gettoken($ToolTipTitle, "1", "|", "t"). $return .gettoken($ToolTipTitle, "2", "|", "t"), $key);

So yes the script still works, but I haven't tested whether Don's change allowing <crlf> in the CTB title block will also work in SC ctbname as well. :?:

Post Reply