TextEntry - Variables within text content. - Forum

Forum Navigation
You need to log in to create posts and topics.

TextEntry - Variables within text content.

Hi,

Can [Variables] be used within TextEntry object?

For example - I am saving TextEntry variable to ini file, but within the text content I have variables also.

 

@adrianbrookbank

Say ...

1) the TextEntry object is called TextEntry8 ... and its associated variable is [TextEntry8]

2) you have pre-defined variables like so ...

SetVar "[firstName]" "Jane"
SetVar "[lastName]" "Doe"

Then, have a button whose click event code is ...

SetVar "[resolvedText]" "[TextEntry8]"
StrReplace "[resolvedText]" "[#91]firstName[#93]" "[firstName]" "[resolvedText]" ""
StrReplace "[resolvedText]" "[#91]lastName[#93]" "[lastName]" "[resolvedText]" ""

Say, the user types ...

My first name is [firstName] and my last name is [lastName]

... then, when the user clicks on the button, [resolvedText] will have the value ...

My first name is Jane and my last name is Doe

Thanks Gaev, makes sense, will give it a go - had a feeling that there would be ASCII involved within the TextEntry contents.

Cheers for the assistance,

@adrianbrookbank

f.y.i. Using Special Characters (visualneo.com)