Any way to toggle "Show file info tips" via script?
-
o7blue
- Posts: 116
- Joined: 22 Dec 2020 07:10
Any way to toggle "Show file info tips" via script?
I would like to be able to quickly toggle file info tips on and off, through a button that invokes a script or command. Is that at all possible?
-
Norn
- Posts: 504
- Joined: 24 Oct 2021 16:10
Re: Any way to toggle "Show file info tips" via script?
Windows 11 24H2 @100% 2560x1440
-
klownboy
- Posts: 4459
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440
Re: Any way to toggle "Show file info tips" via script?
Which is fine for Hover Box (HB)
button "hb";, but it would be nice if there was an equivalent toolbar or scripting command specifically for info tip (IT). So, maybe we should be looking for a new SC setting command, one which would have a flag for toggling "HB" or "IT".EDIT: The suggestion to have a setting command to toggle the Hover Box or the Info Tip would still be great, but until then this works for:
File Info Tip toggle:
sendkeys "{Enter}";button "hb","2";Hover Box toggle:
button "hb";You can assign a separate UDC for toggling File Info Tips or Hover Box or both. I initially thought I had to send a sendkeys "{DOWN}" before the {Enter}, but since a right click on the Hover Box button is initially on the first menu item, which is on "Show File Info Tips", the {DOWN} isn't required.
-
o7blue
- Posts: 116
- Joined: 22 Dec 2020 07:10
Re: Any way to toggle "Show file info tips" via script?
After trying for a bit I actually had to put in the {DOWN} for the UDC to work. That said I'd rather tie it to a button than a UDC, so I have a custom button load this script:
Code: Select all
sendkeys "{DOWN}";
sendkeys "{Enter}";
button "hb","2";
-
klownboy
- Posts: 4459
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440
Re: Any way to toggle "Show file info tips" via script?
Yeah, for me it does not work with {Down}. Must be something with the Configuration or my setup possibly that makes the first item in the menu (Show File Info Tips) react without {Down}. In any case, you should be able to combine the sendkeys statements to one.
sendkeys "{Down}{Enter}";button "hb","2"; or if you kept the UDC even though you're using a CTB, you can simply use the user CID displayed for the UDC (e.g., #1478;).-
o7blue
- Posts: 116
- Joined: 22 Dec 2020 07:10
Re: Any way to toggle "Show file info tips" via script?
Thanks for the tips! Incorporated those and also added a state toggle for the button itself, so it's easier to tell when it's on (adds the visual effect of being pressed down or not).
Not sure why we have different experiences with {DOWN} (I'm on windows 10, not sure if that's at all relevant here), but the important part is that it's documented here.
Code: Select all
perm $file_info_toggle_state = !$file_info_toggle_state;
if ($file_info_toggle_state) {
ctbstate(1, 9);
}
else {
ctbstate(0, 9);
}
sendkeys "{DOWN}{Enter}";
button "hb","2";
XYplorer Beta Club