Jump to content

Stop and Disable for Programs; Folder Enabled/Disable


mvprj84

Recommended Posts

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.

Link to comment

@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!

Link to comment

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.

Link to comment

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.

Link to comment
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.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...