Problem with Control Page Variable (Integer)

Posted on
Mon Sep 21, 2020 7:00 am
SearchCz offline
Posts: 37
Joined: Sep 18, 2019

Problem with Control Page Variable (Integer)

I have an Indigo 7.4 variable I use to track a particular status, with values from one through 5. I am trying to include a graphical indicator on my control page, so I made qa set of five images to correspond to each of the five expected values, plus one with no particular value assigned. So, In the directory '/Library/Application Support/Perceptive Automation/Indigo 7.4/IndigoWebServer/images/controls/variables' I've installed the images myIndicator.png, myIndicator+1.png, myIndicator+2.png (etc).

I've added an object to my control page, set it to display a variable value for my status variable. I selected the image myIndicator. Looks great in the design view. But when I bring that control page up in a browser, the only image it tries to display is http://127.0.0.1:8176/images/controls/v ... 2Btrue.png. I change the value in the variable to some other in range numeric, any other value in fact, and the only image my control page tries to retrieve is the '+true' version (which doesn't exist).

Anyone know why my control page is handling my variable like a boolean, and how I can get the page to treat it like an integer value instead?

Posted on
Mon Sep 21, 2020 8:30 am
mikeL offline
Posts: 46
Joined: Apr 30, 2010
Location: Gatineau, QC

Re: Problem with Control Page Variable (Integer)

The image that you use to define the variable on the control page must be named myIndicator+.png, not myIndicator.png.

By the way, the value of any variable in Indigo is always a text or string type—there are no integers, floats or Boolean values. So, the variable value must always be converted into the type that you need in your code, unless a string is what you want. For example, if the value of myVar is 12.34 and you want to use it in python code as a float, you need float(myVar.value).


Sent from my iPad using Tapatalk

Posted on
Mon Sep 21, 2020 11:01 am
SearchCz offline
Posts: 37
Joined: Sep 18, 2019

Re: Problem with Control Page Variable (Integer)

I added the +, everything is BEAUTIFUL! (sort of). I mean, it all works now. I just need to make it a little prettier. Thanks for the tip !

Posted on
Mon Sep 21, 2020 9:44 pm
mundmc offline
User avatar
Posts: 809
Joined: Sep 14, 2012

Re: Problem with Control Page Variable (Integer)

Please share! I always encourage Control Page design inspiration!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests