Sign in to follow this  
silogarrett

Help with buttons

Recommended Posts

Hi,

I am starting Device1 with one button and stopping it with another, much like start/stop buttons on a panel.

I'm doing the same thing for Device2. However, I don't want Device2 to start unless Device1 has already started.

Can you show me how to do this? I'm a rank newbie and I can't seem to grasp the correct 'if' scripting required.

Thanks!

Share this post


Link to post
Share on other sites

Yes. The output channels are toggling between 1 and 0, depending on button input.

I plan to use the event to send the command to start the devices.

Share this post


Link to post
Share on other sites

Hi,

Thanks for the help - the statement works perfectly. It was the parenthesis that was throwing me.

Next: I have buttons that change pages. Is there a way to create a 'back' button, one that would take you back to the page you were just on, no matter what page that was?

Thanks!

Share this post


Link to post
Share on other sites

Yes, just store the last page in a global variable before you switch the page:

global string lastpage = page.strCurrentPage

page.strCurrentPage = "myNewPage"

Then the back button would just do:

page.strCurrentPage = lastpage

Share this post


Link to post
Share on other sites

Absolutely fantastic. I'm getting better at this - it worked the first time.

THANK YOU!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this