mvprj84 Posted January 19, 2011 Posted January 19, 2011 Was just thinking today - From tests I've run I don't believe disabling a program will also stop it if it's in the middle of running (e.g. on the wait command), and so I often issue a stop command before disabling programs that use the wait command. It would clean up my code a little bit if you guys offered a "stop and disable" option in the drop-down menu of available actions for programs. One other thing that could be useful is the ability to enable/disable programs in an entire folder. Those are the things that are apparent to me (aside from variables) that could clean up some of my code.
Michel Kohanim Posted January 19, 2011 Posted January 19, 2011 Hello mvprj84, Disable indeed stops running programs before disabling them. With kind regards, Michel
apostolakisl Posted January 19, 2011 Posted January 19, 2011 I believe you can disable a folder by setting a flag program and putting the status of that flag in the folder's "if" section.
mvprj84 Posted January 21, 2011 Author Posted January 21, 2011 @Michel - Ahh, I know what I was thinking. I have some programs that I run by enabling them to be triggered by the "if" section, and then I also run them by calling the "then" statement directly at times. I noticed that if a program is disabled and you run the "then" section that sending the disable command doesn't do anything since the program is already disabled. I guess I expected it to be stopped in that situation as well, but the ISY is probably checking the status (enabled/disabled) of the program before setting it so that it's not unnecessarily disabling it again. @apostolakisl - that is a clever workaround, and I think I have a few other ways that may actually be helpful. Thanks!
apostolakisl Posted January 21, 2011 Posted January 21, 2011 mvprj84, Good observation about a disabled program in the midst of running it's "then" doesn't get terminated by sending a "disable" command to it. I suppose that means that if you wanted to interupt a running "then" on a disabled program you would need to send an "enable" followed by "disable". Clearly this is knowledge useful to only the most detailed of programmers, but potentially useful.
oskrypuch Posted January 21, 2011 Posted January 21, 2011 Very useful to know, it could otherwise really confound you, if you tripped over such a situation. * Orest
Sub-Routine Posted January 21, 2011 Posted January 21, 2011 There is a Stop Program command. Only when programs are in folders will disabling the folder stop the program. Rand mvprj84, Good observation about a disabled program in the midst of running it's "then" doesn't get terminated by sending a "disable" command to it. I suppose that means that if you wanted to interupt a running "then" on a disabled program you would need to send an "enable" followed by "disable". Clearly this is knowledge useful to only the most detailed of programmers, but potentially useful.
mvprj84 Posted January 22, 2011 Author Posted January 22, 2011 There is a Stop Program command. True, and in my code I was using the stop command in conjunction with disable commands to try get around this. I was just saying it would make things a little cleaner for me if stop/disable were consistently combined into one command.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.