Runs a single line of Python code as an expression. If a poll rate is specified, the function will be run repeatedly at the poll rate. This is a very powerful way for you to add extensions to the expression language. For example, one could write a project script module function called shared.weather.getTempAt(zip) that queried a web service for the current temperature at a given zip code, and then bind the value of a label to the return value of that function.
The scriptFunction is a entered as a string and the pollRate is in milliseconds. You can optionally add any function arguments after the poll rate.
Note: Normally expressions execute fairly quickly when compared to a script. However, calling runScript will mitigate the speed advantage of an expression. In most cases this is unnoticeable, but calling long running scripts with runScript can negatively impact performance.
The runScript function can be used in expression tags, but the poll rate doesn't work exactly the same as in an expression binding. All Tags have a Scan Class that dictates the minimum amount of time between each evaluation. The runScript poll rate only polls up to the rate of the scan class set on the tag.
For example, if an Expression Tag is configured with runScript to run at a poll rate of 60 seconds and is using the "default" (1 second) scan class, the Tag's Expression will still execute every 1 second. So a scan class rate of 60 seconds will be necessary for a runScript expression to poll at any rate between 0 and 60 seconds.