Announcement

Collapse
No announcement yet.

Stop a running script...?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Moskus
    replied
    Originally posted by sparkman View Post
    Hi Moskus,

    I would set up a virtual device with two possible values: run and stop. Have your script check the value in its loop and if the value has changed to stop then terminate the script.

    Cheers
    Al
    Yes, that's the solution I can think of too (or use a Global Variable), but I would suspect there is another way. It should be possible to do it using code.

    Leave a comment:


  • sparkman
    replied
    Hi Moskus,

    I would set up a virtual device with two possible values: run and stop. Have your script check the value in its loop and if the value has changed to stop then terminate the script.

    Cheers
    Al

    Leave a comment:


  • Moskus
    started a topic Stop a running script...?

    Stop a running script...?

    The HS2 version of my sunshine alarm clock was pretty easy. Just a simple timer that increased the device value at a given interval. You can find it here:
    http://board.homeseer.com/showpost.p...4&postcount=30

    I'm learning HS3 scripting (and plugin writing) so I'm converting my old scripts to HS3.

    HS2 would only run one instance of the above mentioned script, meaning to stop it I could just call the Main sub again with a different parameter (to run it for another room, I had to make duplicates of the script).

    However, that doesn't work anymore. So, how can I now terminate a running script?
Working...
X