Author Topic: [v1.8.5] Fields unexpectedly parsing environment variables  (Read 2404 times)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
[v1.8.5] Fields unexpectedly parsing environment variables
« on: April 21, 2020, 07:59:29 PM »
This may be by design, but I want to make sure, as it can lead to unexpected results:

A number of input fields parse environment variables, including, but certainly not limited to:
  • The input fields for "Set a Text Value to the Windows Clipboard", "Quick Input", and "Write a Value to the Event Log"  actions
  • Every single field of the "Get User Input" actions that isn't numeric-only, E.G. the "Window Title" and "Prompt Text" fields
  • Every field of the "Set a Text Value" action, including the "Variable Name" field
  • The "Variable Name" field of the "Set a Small Integer Value" action, yet not the "Variable Name" field of the "Set an Integer Value" action

It appears the string is parsed for environment variables before being handed off to the token parser, as interrupting it with curly braces (E.G. "%app{}data%" or "{%}appdata%") will stop it from being replaced with the value of the variable, whereas leaving it intact (E.G. "{}%appdata%") will still result in it getting replaced.


This also occurred in v1.7.8, so it's not a Telerik quirk.


The "{STATE_ENV:}" token already facilitates the use of environment variables in a controlled and predictable manner.