Hoyer Posted March 23, 2020 Share Posted March 23, 2020 Hi! I have a very similar problem like this link below: The solution for this problem was: execute("beginseq(" + myString + ")") This way beginseq reads values of a poll. I would like to do the same with if (sequence.myString.running == 0) do somethingendif Do you have any suggestions for the problem? Thank you in advance! Hoyer Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted March 23, 2020 Share Posted March 23, 2020 Certianly. Use evaluate() instead of execute(). Execute() runs a string as a full statement (a complete line of script). Evaluate() takes the string and evaluates it as an expression which returns a result. It can't be used on its on. So while you can do: execute(myString) you can't do: evaluate(myString) Instead, you use evaluate with other script on the same line that uses that result, so: myVar = evaluate(myString) or in your case: if (evaluate("sequence." + myString + ".running") == 0) Quote Link to comment Share on other sites More sharing options...
Hoyer Posted March 23, 2020 Author Share Posted March 23, 2020 Thank you for the quick answer! :) 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.
Note: Your post will require moderator approval before it will be visible.