Forum

My Very First Scrip...
 
Notifications
Clear all

My Very First Script

3 Posts
2 Users
1 Likes
3,710 Views
(@oakbarn)
Trusted Member
Joined: 5 years ago
Posts: 64
Topic starter  

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

 

The 

"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.


   
Quote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

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.


   
ReplyQuote
(@oakbarn)
Trusted Member
Joined: 5 years ago
Posts: 64
Topic starter  

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 reacted
ReplyQuote
Share: