Page 1 of 1

Math Question

PostPosted: Thu Jul 21, 2016 2:31 pm
by RHORHO1
All. New user. Trying to do a simple calculation using variables generated by several TrackBars. I need the answer to show up in a rectangle on the page.

Here is my attempt at the equation:

Math "([TrackBar1]+[TrackBar2]+[TrackBar3]+[TrackBar4]+[TrackBar5]+[TrackBar6]+[TrackBar7]+[TrackBar8]+[TrackBar9]+[TrackBar10]+[TrackBar13]+[TrackBar14])/((6-[TrackBar11])+(6-[TrackBar12]))" "2" "[ISE1]"

The equation is assigned to an Action in a Text Entry box.

When run, nothing shows up in the Text Entry Box.

Can anyone advise? Thanks.

Re: Math Question

PostPosted: Thu Jul 21, 2016 2:57 pm
by Gaev
RHORHO1:

I need the answer to show up in a rectangle on the page.

Rectangles do not have ability to display text ... you might want to try using a Text Box ... have its content be the variable [ISE1].

The equation is assigned to an Action in a Text Entry box.

Are you assigning it to the Text Change action ? ... if so, the command will not be serviced until you make a change to its content.

When run, nothing shows up in the Text Entry Box.

Why would it show up in the TextEntry Box ? ... is [ISE1] the variable associated with this box ?

Math "([TrackBar1]+[TrackBar2]+[TrackBar3]+[TrackBar4]+[TrackBar5]+[TrackBar6]+[TrackBar7]+[TrackBar8]+[TrackBar9]+[TrackBar10]+[TrackBar13]+[TrackBar14])/((6-[TrackBar11])+(6-[TrackBar12]))" "2" "[ISE1]"

Once you decide where you want the result to show up ... and what triggers this calculation ... place this command before the Math command (to verify that it is being triggered) ...
Code: Select all
AlertBox "Before Math" "[ISE1]

... and this command after the Math command (to see what the result was) ...
Code: Select all
AlertBox "After Math" "[ISE1]


Once you can verify that the command is being triggered ... and the value is as expected ... you just have to make sure the variable's contents are shown in a Text Box

Re: Math Question

PostPosted: Thu Jul 21, 2016 3:08 pm
by RHORHO1
Thanks, Gaev. I'll try your suggestions.