BubbaDuck Posted July 22, 2020 Share Posted July 22, 2020 Maybe I am dense or missed this - but is there a way to reuse code? Meaning, say I copy/paste a huge chuck of code to a new button on a keypad. If I want to change an IF I have to delete that IF, dig for the object, recreate the conditional etc. Is there no way to simply change "Variables = X" via simply typing in the number? Or maybe I want copy/paste a bunch of code and everywhere is says to "close" shades I want to "open" shades without have to drag every new command. Is this not a thing anywhere? Quote Link to comment Share on other sites More sharing options...
mstafford388 Posted July 22, 2020 Share Posted July 22, 2020 you can't edit parts of a single line of code, so yes you have to go digging for that object to drag the new command in. When it comes to copy and paste you can copy/paste either a selected command or the entire page. Note that if you copy a selected if statement it will copy all commands nested in that if statement. Hope that answers your questions. Quote Link to comment Share on other sites More sharing options...
BubbaDuck Posted July 22, 2020 Author Share Posted July 22, 2020 It does sadly. I was hoping I had missed something. I know I can find/replace devices, but to dig every time for other items stinks. Ah well. Thank you! Quote Link to comment Share on other sites More sharing options...
jfh Posted July 28, 2020 Share Posted July 28, 2020 Yeah, C4 WYSIWYG is a real PITA if you are a real programmer. Could do some awesome stuff if it supported dynamic variables and arrays. But after you get used to it there are some workarounds. And it’s certainly better than trying the When/If web based mess. Quote Link to comment Share on other sites More sharing options...
BubbaDuck Posted July 28, 2020 Author Share Posted July 28, 2020 Funny, I was trying to solve a “save state” issue the other day which is turning into a pile of variables and timers all over and I was thinking how grand an array would be. 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.