Page 1 of 1
Scripting the Tab Background Color
Posted: 04 Feb 2021 19:16
by Mr_Inc
Is it possible to script the #542 Command to set the tab background color?
Thanks
Re: Scripting the Tab Background Color
Posted: 04 Feb 2021 19:19
by highend
Internal command IDs can't be modified if you're asking that this command sets the background color to some user defined value...
Re: Scripting the Tab Background Color
Posted: 04 Feb 2021 19:20
by Mr_Inc
Thank you. I thought that was the case!
Any other way to do it 'programmatically" via a script?
Re: Scripting the Tab Background Color
Posted: 04 Feb 2021 19:23
by highend
tab() can do it, I guess. Never tried that though
"textcolor", "backcolor" = sets the custom text/background color of a tab
data: color value in hexadecimal format (RRGGBB) (if empty then any custom color is removed)
index: tab to color (if missing then current tab)
return: index of the affected tab
Re: Scripting the Tab Background Color
Posted: 04 Feb 2021 20:11
by klownboy
Try something like this using sendkeys:
Code: Select all
seltab '11'; //whatever tab index you're changing left most tab is '1' and so on
sendkeys "D7D7FF{Enter}";#542; //D7D7FF is in the hexadecimal format for the color code you want
You could automate it further and change a bunch of tab colors.
Edit: The better way to do it is using SC tab() as highend recommended above. The screen could flicker a little using sendkeys especially on a slower computer.
Code: Select all
tab("backcolor","FFB9DC", 6); // '6' in this case is the index
Re: Scripting the Tab Background Color
Posted: 04 Feb 2021 21:36
by Mr_Inc
Is there a similar feature to script for the colors of the breadcrumb on each Pane?
Re: Scripting the Tab Background Color
Posted: 04 Feb 2021 22:44
by klownboy
There is no tab() like command for the breadcrumb bar. You can set the colors via SC setkey command to modify the XYplorer.ini file but changing these values with setkey will require a save.
Code: Select all
//setkey value, key, section, [INIfile], [flags] from the help file
setkey "FFB9DC", "clrCrumb1ActiveBack", "Settings"; // BC active background
setkey "FFB9DC", "clrCrumb2ActiveBack", "Settings"; // BC inactive background
This will change the background of the active pane BC1 background. The screen may flicker slightly but it will change immediately:
Code: Select all
sendkeys "{HOME}ccc{tab 27}^aFFB9DC{Enter}";#600;
For the active BC2 pane:
Code: Select all
sendkeys "{HOME}ccc{tab 31}^aFFB9DC{Enter}";#600;
You can get the other inactive BC background color "keys" from the XYplorer.ini file.
Re: Scripting the Tab Background Color
Posted: 05 Feb 2021 01:54
by Mr_Inc
Thanks.