My Very First Scrip...

My Very First Script  


Trusted Member
Joined: 7 months ago
Posts: 64
January 31, 2019 4:09 pm  

I decided to try a little script.  It runs fine but I do not understand the Visibility attribute of an Element

The code:

//This is my first attemp at a Script
//The Script will Start the "MashTimer" and turn on the "Blue Pump"
//Device Element:WS: Test#1 Degrees F/>"MashTimer" Timer Countdown 01:30:00

//Device Element:WS: Test#1 Degrees F/>"Blue Pump" Digital Output Port 15
"MashTimer" Enabled = True
"Blue Pump" Enabled = True
"Blue Pump" State = Off
Reset "MashTimer"
Start "MashTimer
Print "Mash Timer is Running Countdown from 01:30:00"
// I am trying to ghide the "MashTimer" on the workspace. Nothing happens that I can see
sleep 6000
"MashTimer" Visibility = Hidden
sleep 6000
new time varMashStep1End
varMashStep1End = 01:28:00
If "MashTimer" Value == varMashStep1End
"Blue Pump" State = On
Print "Blue Pump turned on at 1:28:00 remaining"
End If



"MashTimer" Visibility = Hidden

does not seem to do anything.  I am just trying to hide the Timer on the Workspace.

There is no Practical Purpose for this except when I get my Workspace setup, I would like to control what is on the Display and when using Script.


If I can, I would get rid of the Mash Timer Element and have my Sparge Timer be displayed in the same area or the Work space (stacked).

I also played with the DisplayText attribute and go an error.

Estimable Member Admin
Joined: 2 years ago
Posts: 239
February 1, 2019 4:35 am  

You need to revove the forced visibility on the Workspace. Click the eye icon in the top bar to clear it. This un-forces hidden elements to be visible.

This post was modified 5 months ago by pbruno3

Trusted Member
Joined: 7 months ago
Posts: 64
February 2, 2019 1:32 am  

I figured it out.  Dreaded space at the end of a name:  "MashTimer " vs "MashTimer"

"MashTimer " Visibility = Hidden would have worked.

It was the name in the Element Widget.  I had hit a space at the end of a name.

I corrected and got rid of the space and it works fine.

"MashTimer" Visibility = Hidden

pbruno3 liked