ILoveC4 Posted April 6, 2020 Share Posted April 6, 2020 Can someone comment on why you'd chose to do one of these over the other? It seems they both accomplish the same thing. I've never really leveraged "Else" in Control4. Just wondering if there's a reason why one would use one of these examples over the other, assuming they didn't mind the "STOP" command from killing the script from continuing. Quote Link to comment Share on other sites More sharing options...
VINCELdUB Posted April 6, 2020 Share Posted April 6, 2020 Take a quick peek at the two images you have sent. Which one can be accomplished in the least amount of clicks?For the sake of time and characters onscreen, I feel you have your own answer. PS. This is mike. Vince’s partner. I have taken over VINCELdUB’s postings as he is no longer here. Quote Link to comment Share on other sites More sharing options...
South Africa C4 user Posted April 13, 2020 Share Posted April 13, 2020 On 4/6/2020 at 5:55 PM, VINCELdUB said: Take a quick peek at the two images you have sent. Which one can be accomplished in the least amount of clicks? For the sake of time and characters onscreen, I feel you have your own answer. PS. This is mike. Vince’s partner. I have taken over VINCELdUB’s postings as he is no longer here. No longer here but will be back? Or no longer working with you? Quote Link to comment Share on other sites More sharing options...
South Africa C4 user Posted April 13, 2020 Share Posted April 13, 2020 On 4/6/2020 at 5:37 PM, ILoveC4 said: Can someone comment on why you'd chose to do one of these over the other? It seems they both accomplish the same thing. I've never really leveraged "Else" in Control4. Just wondering if there's a reason why one would use one of these examples over the other, assuming they didn't mind the "STOP" command from killing the script from continuing. Apart from number of clicks, the else route avoids strange behavior if the variable (power state in your case) changes milliseconds after you start running the code. Quote Link to comment Share on other sites More sharing options...
lukas.polivka Posted May 4, 2020 Share Posted May 4, 2020 Additionally, you might want to execute some more commands later in the script, i.e., after the if-else block, regardles of which branch (if-else) was chosen. It's not possible with the 'Stop' command (unless you duplicate those commands before each Stop). The script just ends there. Quote Link to comment Share on other sites More sharing options...
Cyknight Posted May 5, 2020 Share Posted May 5, 2020 He already made the assumption the stop command wasn't an issue. Also the second stop is redundant. But yes the biggest point would be to stopping the overall script (or having to build in more layers of programming. It's functional use is limited beyond that (as frankly, it would only be one line less to program, assuming you even need a stop command for the programming. It IS more in line with common programming languages, and if you're using it in extensive macros, it makes it easier to track 'sections' of programming. brucecampbell 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.