Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Global Variables (Read 3113 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Global Variables

Is there a way to make variables I can access from any component? In my case I would need to access it from: Panel Stack Splitter, ELPlaylist and WSH Panel Mod.
I am asking because I would like to add the ability to switch colourthemes to my skin.

Global Variables

Reply #1
Extended Variables - you can use any system color (%COLOR_*name*%) or make custom variable and call it by any component (i.e. define variable in preferences temp = $rgb(10,10,10) and then call it like %temp%)

 

Global Variables

Reply #2
Extended Variables provides "variables" usable in any components, but personnal new "variable" have to be set manually before use ... and can't mod modified by script or other way (and restart is needed after each modification)... so, it should be titled "Extended Constants" ...

Some extra "constant" are embedded with the component, list below :

Code: [Select]
FOOBAR_PATH
COLOR_SCROLLBAR
COLOR_BACKGROUND
COLOR_ACTIVECAPTION
COLOR_INACTIVECAPTION
COLOR_MENU
COLOR_WINDOW
COLOR_WINDOWFRAME
COLOR_MENUTEXT
COLOR_WINDOWTEXT
COLOR_CAPTIONTEXT
COLOR_ACTIVEBORDER
COLOR_INACTIVEBORDER
COLOR_APPWORKSPACE
COLOR_HIGHLIGHT
COLOR_HIGHLIGHTTEXT
COLOR_BTNFACE
COLOR_BTNSHADOW
COLOR_GRAYTEXT
COLOR_BTNTEXT
COLOR_INACTIVECAPTIONTEXT
COLOR_BTNHIGHLIGHT
COLOR_3DDKSHADOW
COLOR_3DLIGHT
COLOR_INFOTEXT
COLOR_INFOBK
COLOR_HOTLIGHT
COLOR_GRADIENTACTIVECAPTION
COLOR_GRADIENTINACTIVECAPTION
COLOR_MENUHILIGHT
COLOR_MENUBAR
COLOR_DESKTOP
COLOR_3DFACE
COLOR_3DSHADOW
COLOR_3DHIGHLIGHT
COLOR_3DHILIGHT
COLOR_BTNHILIGHT
SM_ARRANGE
SM_CMONITORS
SM_CMOUSEBUTTONS
SM_CXBORDER
SM_CXCURSOR
SM_CXDLGFRAME
SM_CXDOUBLECLK
SM_CXDRAG
SM_CXEDGE
SM_CXFIXEDFRAME
SM_CXFOCUSBORDER
SM_CXFRAME
SM_CXFULLSCREEN
SM_CXHSCROLL
SM_CXHTHUMB
SM_CXICON
SM_CXICONSPACING
SM_CXMAXIMIZED
SM_CXMAXTRACK
SM_CXMENUCHECK
SM_CXMENUSIZE
SM_CXMIN
SM_CXMINIMIZED
SM_CXMINSPACING
SM_CXMINTRACK
SM_CXSCREEN
SM_CXSIZE
SM_CXSIZEFRAME
SM_CXSMICON
SM_CXSMSIZE
SM_CXVIRTUALSCREEN
SM_CXVSCROLL
SM_CYBORDER
SM_CYCAPTION
SM_CYCURSOR
SM_CYDLGFRAME
SM_CYDOUBLECLK
SM_CYDRAG
SM_CYEDGE
SM_CYFIXEDFRAME
SM_CYFOCUSBORDER
SM_CYFRAME
SM_CYFULLSCREEN
SM_CYHSCROLL
SM_CYICON
SM_CYICONSPACING
SM_CYKANJIWINDOW
SM_CYMAXIMIZED
SM_CYMAXTRACK
SM_CYMENU
SM_CYMENUCHECK
SM_CYMENUSIZE
SM_CYMIN
SM_CYMINIMIZED
SM_CYMINSPACING
SM_CYMINTRACK
SM_CYSCREEN
SM_CYSIZE
SM_CYSIZEFRAME
SM_CYSMCAPTION
SM_CYSMICON
SM_CYSMSIZE
SM_CYVIRTUALSCREEN
SM_CYVSCROLL
SM_CYVTHUMB
SM_MEDIACENTER
SM_MENUDROPALIGNMENT
SM_MIDEASTENABLED
SM_MOUSEPRESENT
SM_MOUSEWHEELPRESENT
SM_PENWINDOWS
SM_REMOTECONTROL
SM_REMOTESESSION
SM_SAMEDISPLAYFORMAT
SM_SHOWSOUNDS
SM_SWAPBUTTON
SM_XVIRTUALSCREEN
SM_YVIRTUALSCREEN

Global Variables

Reply #3
Quote
Some extra "constant" are embedded with the component, list below :


Sorry for the dumb question, but how am I suppose to use colour variables? %COLOR_SCROLLBAR% returns for example FFFFFF, but foobar2k $rgb function takes 3 separate arguments - should I parse this variable and slice whatever it returns into 3 separate values? I refuse to believe so (;

Global Variables

Reply #4
Enclose it in ETX (Alt - 003) character: FFFFFF

Global Variables

Reply #5
O, thanks... thought it was deprecated or something...
Still -why this 'variables' aren't parsed (even at startup) preventing me from adding to it things like
Code: [Select]
$blend($rgb(255,255,255),$rgb(82,119,149),,)

?

Global Variables

Reply #6
Thanks 2E7AH and Falstaff. I guess constants might not be the optimal way for colour changing, but it's certainly enough and better then having to change code in each component