There on image u can see temperature data of usual HTPC parts as numerals, pulled out from Xmon as usual. However same data is also presented on those thermometers, and that is where xPerT enters the picture. To enable us to do what is shown, we'll be needing 3 xPerT features: presentor called progress bar, arithmetics to scale the value for the bar, and smugglers which are used to go around limitation of xlobby's nonexistant interplugin communication interface.
Well let us take a look into smuggling first: we have contraband which is information Xmon provides us which can be accessed in our example with variable
- Code: Select all
plugin>XMonitor>Speedfan.Temp.1.value
To get this contraband trough border between Xmon and Xpert, which is guarded by evil Norwegian border patrol , we'll need our mule. Mule is simply a text field which has given ID "MULE_stash", where stash is the cache where our mule will deliver the precious contraband, stash is actually a regular xlobby variable, which is accessible outside xlobby, including within xPerT. To avoid getting stripped by damn norwegian gaypatrol our mule have to hide himself well. usually he hides trough 100% alpha camouflage or mayby even in dummy screen, but in our case, cause we dont really mind about temperature value showing, he is hiding just under our noses. Yes, u guessed right, in picture above the text field holdin numeric value of temperature is our mule, the first one uses above mentioned code to get the contraband and has following ID
- Code: Select all
MULE_cputemp
So our smuggling command is:
- Code: Select all
xPerT
Smuggle
var>cputemp
keep in mind that if u want thermometers to update constantly u need to keep on smuggling, running the command on everysecond or so... but if its not so timesensitive for u, u could smuggle once when entering the screen, or have update button to do the smuggle.
Ok now that we know how to access the data lets see how we can use it. Thermometer in picture is sumply background graphics, only red bar within is live xPerT bar... now let us see the variable behind that bar
- Code: Select all
plugin>xPerT>!0!present>progress bar>[[variable>cputemp]*10]>vertical>skin:/buttons/red.png>skin:/buttons/empty.png
There... very simple just regular xPerT presentor, first parameter being type (progress bar), second is the value we saw all the trouble to smuggle, trough some xPerT arithmetics, third is simply filename of progress bar graphix our blood red thermosensitive substance, and last one is the background file, which in our case is as c-tru as emperor's clothing.
But lets take a second look of second parameter with all those nested brackets... as u might remember those brackets are delimiters of xPerT variables and process of solving their values starts within the innermost nest, which is variable>cputemp, which is regular xlobby variable, our stash, now holding that contraband which we muled out from Xmon, however it is not ready for presenting cause xPerT's progress bar expects value on range from zero to thou.
So all we need to do is apply simple xPerT arithmetics to the value to make it suitable for the range, scaling it. We chooge to multiply it with scale of ten cause atleast my intel will be up in smoke way before it hits 100 degrees of celsius. Multiplying with ten means our bar can represent temperatures from 0-100, actually if u want thermometers to be more useful, u could select much more thighter scale by using arithmetics for normalization and scaling the value before feeding it to progress bar.
Well i hope this made some sense for somebody... and thank badubo for another great plugin.