<!-- saved from url=(0014)about:internet -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><TITLE>What is Virtual Text?</TITLE><meta name="generator" content="Fast-Help"><meta name="keywords" content="What is Virtual Text?">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
#FHNonScroll
{padding: 6px 6px 0px 6px; border-bottom: none; background: #D1D1D1; vertical-align: top;z-index: 2; visibility: visible; position: absolute; left: 0; top: 0; width: 100%; }
#FHScroll
{left: 0; top: 0px; position: absolute; margin: 0; padding: 10px; z-index: 1; background-repeat: no-repeat; background-position: bottom right; background-attachment: fixed; }
/* ========== Text Styles ========== */
hr { color: #000000}
body, table /* Normal */
{
font-size: 10pt;
font-family: 'Arial';
font-style: normal;
font-weight: normal;
color: #000000;
text-decoration: none;
}
span.rvts1
{
font-family: 'Arial Unicode MS';
}
span.rvts2
{
font-family: 'Verdana';
color: #000000;
}
span.rvts3
{
font-family: 'Verdana';
font-weight: bold;
color: #000000;
}
span.rvts4
{
font-family: 'Verdana';
}
span.rvts5
{
font-family: 'Verdana';
font-weight: bold;
}
a.rvts6, span.rvts6
{
font-family: 'Verdana';
color: #0000ff;
text-decoration: underline;
}
a.rvts6:hover { color: #0000ff; }
a.rvts7, span.rvts7
{
font-family: 'Verdana';
color: #0000ff;
text-decoration: underline;
}
a.rvts7:hover { color: #0000ff; }
a.rvts8, span.rvts8
{
font-family: 'Verdana';
color: #0000ff;
text-decoration: underline;
}
a.rvts8:hover { color: #0000ff; }
/* ========== Para Styles ========== */
p,ul,ol /* Left */
{
text-align: left;
text-indent: 0px;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
.rvps1
{
}
--></style>
<script type="text/javascript" language="JavaScript" src="FHUtilities.js"></script>
<script type="text/JavaScript" language="JavaScript">
<!-- If this page is displayed outside of the Website Help Frameset, then reload in the Frame set
if (parent.location.href == self.location.href)
{location.href = "index.html?"+extractFileNameWithoutKnownExtension(location.href);}
//--></script>
<script type="text/javascript" language="JavaScript" src="FHNonscroll.js"></script><script type="text/javascript" language="JavaScript" src="FHUtilities.js"></script></HEAD>
<body bgcolor="#FFFFFF" scroll="no"><div id="FHNonScroll"><table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td width="100%" align="left">
<font size=2 color="#000000" face="Arial">
<div><font size=5 color="#333333" face="Verdana"><b>What is Virtual Text?</b></font></div>
</font>
</TD><td width="120" align="right" nowrap><font face="Verdana" size="2"><a href="WindowsServiceTestCondition.html"><img src="Images/BrowseBlueLeft.png" border="0" alt="Previous Topic"></a> <a href="VirtualTextDefinitions.html"><img src="Images/BrowseBlueRight.png" border="0" alt="Next Topic"></a> </font></td></tr></table></div><div id="FHScroll">
<p class=rvps1><span class=rvts4>Virtual text is used throughout InstallJammer as a way to define variables within an install and sometimes within the install builder itself. You will see virtual text throughout your use of InstallJammer as text that is between <% and %>.</span></p>
<p class=rvps1><span class=rvts4><br></span></p>
<p class=rvps1><span class=rvts4>Some virtual text is defined by you when you create your project and other virtual text is defined by InstallJammer when it builds your project. An example of virtual text that you define is the <%AppName%> virtual text which represents the Application Name you filled in when you created your project. An example of virtual text defined by InstallJammer would be <%InstallMode%> which, during installation, can tell you whether the user chose a Standard, Default or Silent install.</span></p>
<p class=rvps1><span class=rvts4><br></span></p>
<p class=rvps1><span class=rvts4>Virtual text is an easy way for InstallJammer to represent variable data within an install, and since it can be nested, virtual text can contain other virtual text that will all be represented when it is used within an install.</span></p>
<p class=rvps1><span class=rvts4><br></span></p>
<p class=rvps1><span class=rvts4><br></span></p>
<p class=rvps1><span class=rvts5>Using Virtual Text </span></p>
<p class=rvps1><span class=rvts4>Virtual text can be used almost anywhere in an install, and InstallJammer will automatically substitute the virtual text for its value when it is needed. To use virtual text, simply use one of the available </span><a class=rvts6 href="VirtualTextDefinitions.html">Virtual Text Definitions</a><span class=rvts2> between <% and %>.</span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts2>For example, <%AppName%> when used in a project will be substituted for your Application Name during installation. <%Platform%> will be substituted for the name of the current platform you're installing on (Windows, Linux-x86, etc...).</span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts2>Virtual text can be nested inside of another virtual text definition, and InstallJammer will automatically substitute all the values recursively. This means that if your Application Name contains "My Application <%Version%>" InstallJammer will substitute the <%Version%> recursively inside the virtual text to the value of your application's version. So, you would get "My Application 1.0" (or whatever your version is).</span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts3>Arguments in Virtual Text </span></p>
<p class=rvps1><span class=rvts2>Some virtual text fields can also receive arguments that modify the value of the virtual text. In this case, the virtual text will not be a single word surrounded by <% and %>, but will instead be the first word of the virtual text along with arguments passed after the word. An example is the <%Date%> virtual text which can be passed with an argument that specifies the format of the date string. Example:</span>
<br><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts2><%Date %m/%d/%Y%></span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts2>This tells InstallJammer to return today's date in format of Month/Day/Four-digit-year. %m/%d/%Y is an argument passed to the Date virtual text.</span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts2>Another example:</span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts2><%Dir C:\foo\bar forwardslash%></span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts2>would return</span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts2>C:/foo/bar</span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts3>Boolean Values in Virtual Text </span></p>
<p class=rvps1><span class=rvts2>InstallJammer automatically converts any virtual text value that looks like a boolean into a 0 or 1. This is mostly to make dealing with booleans simpler, but it's also so that checkbuttons respond accurately to virtual text since checkbuttons expect a 0 or 1 for value and not the various boolean values that are acceptable. Acceptable boolean values are: 0, false, no, or off or 1, true, yes or on, or any abbreviated or uppercase spellings.</span></p>
<p class=rvps1><span class=rvts2><br></span></p>
<p class=rvps1><span class=rvts2>You should always check virtual text variables that are boolean by checking to see if the string is true or false and not a specific string like yes or no. The </span><a class=rvts7 href="StringIsCondition.html">String Is Condition</a><span class=rvts2> is better than a </span><a class=rvts8 href="StringEqualCondition.html">String Equal Condition</a><span class=rvts2> for boolean values.</span><span class=rvts1></span></p>
</div></body></html>