How can I have a variation name as text in rackspace panel (different text for each variation under same rackspace)?
I know I can use [value] to display value as caption - is there something as [variation_name] to show caption of variation name?
tnx
Hi @danijell and welcome to our community!
You can only do this by using a small snippet of GPScriptā¦ and the script has to be in each rackspace!
First, place a Textlabel widget onto your rackspace panel, then give it a name for the use in GPScript.
You can do this on the āAdvancedā tab of a widget when in edit mode.
In my script i used the name ālblVariationNameā (you can use any name you want, but youāll have to use the same name in the script then).
Now open the script editor: menu ā window ā script editor
Then C&P this code into the editor and press the āCompileā button. After that the script should work.
var
lblVariationName : widget
// Called once when rackspace is first loaded
Initialization
SetWidgetLabel(lblVariationName, GetVariationName(GetCurrentVariation()))
End
// Called when you switch variations
On Variation(oldVariation : integer, newVariation : integer)
SetWidgetLabel(lblVariationName, GetVariationName(newVariation))
End
ā¦hope it helps.
If you have questions, donāt hesitate to ask!
EDIT: I added some code, so the script will not only catch the variationās name when a variation is actually changed, but also at the start of the program.
Cheers
Erik
5 Likes
Erik,
tnx for a welcome note - Iāve been trying GigPerformer for a few weeks - and decided I can get rid off my HW gear
tnx a million for script - it works like a charm
looking fwd to get to the point I can help newcomers.
keep safeā¦
Danijel
8 Likes