How do I use Virtual Text Correctly?

From InstallJammer Wiki

Jump to: navigation, search

Virtual Text turns out to be a little tricky for a lot of beginner InstallJammer users. Simply, Virtual Text is InstallJammer's way of storing variables. Where the confusion comes in is when should you reference the variable itself (name of the virtual text) or reference the data stored within the variable (the actual text the virtual text represent). Once you get and understanding of when to use virtualtextname instead <%virtualtextname%>, it all becomes pretty clear.

Plain and simple, any time you want to display what is in the virtual text variable or run a condition on the string data stored in a virtual text variable, you should use <% and %> around the virtual text name. Examples include:

When you want to set some value to a virtual text variable or check if it exists then you use only the virtual text name and not the surrounding <% and %>. Examples include:

In general, if you want to access the data within the virtual text variable use the <%vtname%> format. If you want to set some value (e.g., text from an entry widget) use only vtname.

Personal tools