Announcement

Collapse
No announcement yet.

Feature Request for ReplaceVariables on parameter option

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

    Feature Request for ReplaceVariables on parameter option

    Event actions “run script” and “run program or process” should have an advanced option checkbox to process the parameter text with ReplaceVariables. It would be a convenience for almost all scripts I have written by eliminating the need to include this repetitive code in the scripts - However it is especially useful for running programs and passing variables as parameters under Linux, The only way to do this now as I understand is to code a specific wrapper script for each program that does ReplaceVariables on the parameter text and then invokes the target program. With this option implemented there is no wrapper required and run program becomes much more useful. Ideally, this would be the default behavior for parameter strings and the option would be to disable it if necessary as an advanced option.

    #2
    You just need to add one line to your script. See here: https://forums.homeseer.com/forum/ho...20#post1475320
    Jon

    Comment


      #3
      This feature request is mainly for “run program” action which is pretty much useless if you want to pass a variable value in the parameter string to a program. The only way AFAIK is write code to wrap it in a script that does ReplaceVariables and then launch the program with the modified parameter text. This is a fair amount of work for an extremely common occurrence that would be zero code with the proposed option. I suggested it for scripts as well just for consistency and convenience. Actually it probably doesn’t even have to be an option - just the normal processing for parameter text because invoking ReplaceVariables a second time on a parameter should have no effect on the parameter for existing scripts.

      Comment

      Working...
      X