silogarrett Posted April 21, 2010 Share Posted April 21, 2010 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! Link to comment Share on other sites More sharing options...
AzeoTech Posted April 21, 2010 Share Posted April 21, 2010 What do you do to start device1? Set an output channel? Link to comment Share on other sites More sharing options...
silogarrett Posted April 21, 2010 Author Share Posted April 21, 2010 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. Link to comment Share on other sites More sharing options...
AzeoTech Posted April 21, 2010 Share Posted April 21, 2010 so the if would be: if (outchanneldevice1[0]) .. do something if device1 is on endif Link to comment Share on other sites More sharing options...
silogarrett Posted April 22, 2010 Author Share Posted April 22, 2010 Thank you! I will give it a try. Link to comment Share on other sites More sharing options...
silogarrett Posted April 22, 2010 Author Share Posted April 22, 2010 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! Link to comment Share on other sites More sharing options...
AzeoTech Posted April 22, 2010 Share Posted April 22, 2010 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 Link to comment Share on other sites More sharing options...
silogarrett Posted April 22, 2010 Author Share Posted April 22, 2010 Absolutely fantastic. I'm getting better at this - it worked the first time. THANK YOU! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.