Add files via upload

This commit is contained in:
Mahmoud Gomaa authored and GitHub committed 2021-12-06 18:55:28 +02:00
1 parent 58e7425595
commit 1254f56193
35 files changed
+2870

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
@page
@{
ViewData["title"] = "Copy Path - Examples";
ViewData["page-support"] = "Examples \\ Copy Path";
ViewData["meta-og:image"] = "/images/support/examples/copypath1.png";
}
<h5>Copy Path example</h5>
<pre class="syntax"><code>shell
{
dynamic
{
<span class="syntax-comment">// type can set with '~taskbar' equals all file types except taskbar.</span>
menu(type=<span class="syntax-string">'file|dir|back|root|namespace'</span> title=<span class="syntax-string">'copy to clipboard'</span> image=<span class="syntax-number">#ff00ff</span>)
{
<span class="syntax-comment">// Appears only when multiple selections.</span>
item(vis=<span class="syntax-code">@@(sel.count > 1)</span> title=<span class="syntax-string">'Copy path (</span><span class="syntax-code">@@sel.count</span><span class="syntax-string">) items selected'</span>
cmd=<span class="syntax-code">@@sys.copy(sel(false, "\n"))</span>)
item(mode=<span class="syntax-keyword">single</span> title=<span class="syntax-code">@@sel.path</span>
cmd=<span class="syntax-code">@@sys.copy(sel.path)</span>)
item(mode=<span class="syntax-keyword">single</span> type=<span class="syntax-string">'file|dir|back.dir'</span>
vis=<span class="syntax-code">@@sel.short.len!=sel.path.len</span> title=<span class="syntax-code">@@sel.short</span>
cmd=<span class="syntax-code">@@sys.copy(sel.short)</span>)
separator
item(mode=<span class="syntax-keyword">single</span> vis=<span class="syntax-code">@@(sel.parent.len>3)</span> title=<span class="syntax-code">@@sel.parent</span>
cmd=<span class="syntax-code">@@sys.copy(sel.parent)</span>)
separator
item(mode=<span class="syntax-keyword">single</span> type=<span class="syntax-string">'file|dir|back.dir'</span> title=<span class="syntax-code">@@sel.file.name</span>
cmd=<span class="syntax-code">@@sys.copy(sel.file.name)</span>)
item(mode=<span class="syntax-keyword">single</span> type=<span class="syntax-string">'file'</span> title=<span class="syntax-code">@@sel.file.title</span>
cmd=<span class="syntax-code">@@sys.copy(sel.file.title)</span>)
item(mode=<span class="syntax-keyword">single</span> type=<span class="syntax-string">'file'</span> title=<span class="syntax-code">@@sel.file.ext</span>
cmd=<span class="syntax-code">@@sys.copy(sel.file.ext)</span>)
}
}
}</code></pre>
<div class="has-text-centered my-5">
<a class="lightbox">
<img class="is-256" src="~/images/support/examples/copypath1.png">
</a>
<a class="lightbox">
<img class="is-256" src="~/images/support/examples/copypath2.png">
</a>
<a class="lightbox">
<img class="is-256" src="~/images/support/examples/copypath3.png">
</a>
</div>
+43
View File
@@ -0,0 +1,43 @@
@page
@{
ViewData["title"] = "Favorites - Examples";
ViewData["page-support"] = "Examples \\ Favorites";
ViewData["meta-og:image"] = "/images/support/examples/fav1.png";
}
<h5>Favorite applications and directories example</h5>
<pre class="syntax"><code>shell
{
dynamic
{
menu(type=<span class="syntax-string">'desktop|taskbar'</span> title=<span class="syntax-string">'Favorites'</span> image=<span class="syntax-number">#00ff00</span>)
{
menu(title=<span class="syntax-string">'Applications'</span> image=<span class="syntax-number">#ff0000</span>)
{
item(title=<span class="syntax-string">'Command propt'</span> <span class="syntax-keyword">image</span> cmd=<span class="syntax-string">'cmd.exe'</span>)
item(title=<span class="syntax-string">'PowerShell'</span> <span class="syntax-keyword">image</span> cmd=<span class="syntax-string">'powershell.exe'</span>)
item(title=<span class="syntax-string">'Registry editor'</span> <span class="syntax-keyword">image</span> cmd=<span class="syntax-string">'regedit.exe'</span>)
separator
item(title=<span class="syntax-string">'Paint'</span> <span class="syntax-keyword">image</span> cmd=<span class="syntax-string">'mspaint.exe'</span>)
item(title=<span class="syntax-string">'Notepad'</span> <span class="syntax-keyword">image</span> cmd=<span class="syntax-string">'notepad.exe'</span>)
}
separator
menu(title=<span class="syntax-string">'Directories'</span> image=<span class="syntax-number">#0000ff</span>)
{
item(title=<span class="syntax-string">'Downloads'</span> cmd=<span class="syntax-code">@@user.downloads</span>)
item(title=<span class="syntax-string">'Pictures'</span> cmd=<span class="syntax-code">@@user.pictures</span>)
item(title=<span class="syntax-string">'Home'</span> cmd=<span class="syntax-code">@@user.directory</span>)
separator
item(title=<span class="syntax-string">'Windows'</span> cmd=<span class="syntax-code">@@sys.directory</span>)
item(title=<span class="syntax-string">'Program files'</span> cmd=<span class="syntax-code">@@sys.prog</span>)
}
}
}
}</code></pre>
<figure class="has-text-centered my-5">
<a class="lightbox">
<img class="is-256" src="~/images/support/examples/fav1.png">
</a>
<a class="lightbox">
<img class="is-256" src="~/images/support/examples/fav2.png">
</a>
</figure>
+64
View File
@@ -0,0 +1,64 @@
@page
@{
ViewData["title"] = "Goto - Examples";
ViewData["page-support"] = "Examples \\ Goto";
ViewData["meta-og:image"] = "/images/support/examples/goto.png";
}
<h5>Goto example</h5>
<pre class="syntax"><code>shell
{
dynamic
{
menu(mode=<span class="syntax-keyword">multiple</span> title=<span class="syntax-string">'goto'</span> separator=<span class="syntax-keyword">bottom</span> image=<span class="syntax-number">0xed25</span>)
{
item(title=<span class="syntax-string">'Windows'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@sys.dir</span>)
item(title=<span class="syntax-string">'System'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@sys.bin</span>)
item(title=<span class="syntax-string">'Program Files'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@sys.prog</span>)
item(title=<span class="syntax-string">'Program Files x86'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@sys.prog32</span>)
item(title=<span class="syntax-string">'ProgramData'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@sys.programdata</span>)
item(title=<span class="syntax-string">'Applications'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-string">'shell:appsfolder'</span>)
item(title=<span class="syntax-string">'Users'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@sys.users</span>)
item(title=<span class="syntax-string">'Control Panel'</span> image=<span class="syntax-number">0xe115</span> cmd=<span class="syntax-string">'shell:::{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}'</span>)
item(title=<span class="syntax-string">'Control Panel (All Tasks)'</span> image=<span class="syntax-number">0xe115</span> cmd=<span class="syntax-string">'shell:::{ED7BA470-8E54-465E-825C-99712043E01C}'</span>)
item(title=<span class="syntax-string">'run'</span> cmd=<span class="syntax-string">'shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}'</span>)
separator
item(title=<span class="syntax-code">@@user.name@@@@@@sys.name</span> vis=<span class="syntax-keyword">disable</span>)
item(title=<span class="syntax-string">'Desktop'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@user.desktop</span>)
item(title=<span class="syntax-string">'Downloads'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@user.downloads</span>)
item(title=<span class="syntax-string">'Pictures'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@user.pictures</span>)
item(title=<span class="syntax-string">'Documents'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@user.documents</span>)
item(title=<span class="syntax-string">'Startmenu'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@user.startmenu</span>)
item(title=<span class="syntax-string">'Profile'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@user.dir</span>)
item(title=<span class="syntax-string">'AppData'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@user.appdata</span>)
item(title=<span class="syntax-string">'Temp'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-code">@@user.temp</span>)
menu(title=<span class="syntax-string">'settings'</span> separator=<span class="syntax-keyword">top</span> image=<span class="syntax-number">0xe115</span>)
{
<span class="syntax-comment">// https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-settings-app</span>
item(title=<span class="syntax-string">'systeminfo'</span> image=<span class="syntax-number">0xe946</span> cmd-line=<span class="syntax-string">'/K systeminfo'</span>)
item(title=<span class="syntax-string">'search'</span> cmd=<span class="syntax-string">'search-ms:'</span> image=<span class="syntax-number">0xe721</span>)
item(title=<span class="syntax-string">'settings'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-string">'ms-settings:'</span>)
item(title=<span class="syntax-string">'about'</span> image=<span class="syntax-number">0xe946</span> cmd=<span class="syntax-string">'ms-settings:about'</span>)
item(title=<span class="syntax-string">'usb'</span> image=<span class="syntax-number">0xe88e</span> cmd=<span class="syntax-string">'ms-settings:usb'</span>)
item(title=<span class="syntax-string">'network-status'</span> image=<span class="syntax-number">0xec27</span> cmd=<span class="syntax-string">'ms-settings:network-status'</span>)
item(title=<span class="syntax-string">'network-ethernet'</span> image=<span class="syntax-number">0xe839</span> cmd=<span class="syntax-string">'ms-settings:network-ethernet'</span>)
item(title=<span class="syntax-string">'personalization-background'</span> image=<span class="syntax-number">0xeb9f</span> cmd=<span class="syntax-string">'ms-settings:personalization-background'</span>)
item(title=<span class="syntax-string">'personalization-colors'</span> image=<span class="syntax-number">0xe790</span> cmd=<span class="syntax-string">'ms-settings:colors'</span>)
item(title=<span class="syntax-string">'lockscreen'</span> image=<span class="syntax-number">0xee3f</span> cmd=<span class="syntax-string">'ms-settings:lockscreen'</span>)
item(title=<span class="syntax-string">'personalization-start'</span> image=<span class="syntax-number">0xeca5</span> cmd=<span class="syntax-string">'ms-settings:personalization-start'</span>)
item(title=<span class="syntax-string">'appsfeatures'</span> image=<span class="syntax-number">0xe179</span> cmd=<span class="syntax-string">'ms-settings:appsfeatures'</span>)
item(title=<span class="syntax-string">'optionalfeatures'</span> image=<span class="syntax-number">0xe179</span> cmd=<span class="syntax-string">'ms-settings:optionalfeatures'</span>)
item(title=<span class="syntax-string">'defaultapps'</span> image=<span class="syntax-number">0xe17d</span> cmd=<span class="syntax-string">'ms-settings:defaultapps'</span>)
item(title=<span class="syntax-string">'yourinfo'</span> image=<span class="syntax-number">0xe136</span> cmd=<span class="syntax-string">'ms-settings:yourinfo'</span>)
item(title=<span class="syntax-string">'windowsupdate'</span> image=<span class="syntax-number">0xe895</span> cmd=<span class="syntax-string">'ms-settings:windowsupdate'</span>)
item(title=<span class="syntax-string">'windowsdefender'</span> image=<span class="syntax-number">0xe83d</span> cmd=<span class="syntax-string">'ms-settings:windowsdefender'</span>)
item(title=<span class="syntax-string">'network connections'</span> image-<span class="syntax-keyword">inherit</span> cmd=<span class="syntax-string">'shell:::{7007ACC7-3202-11D1-AAD2-00805FC1270E}'</span>)
}
}
}
}</code></pre>
<div class="has-text-centered my-5">
<a class="lightbox">
<img class="is-256" src="~/images/support/examples/goto.png">
</a>
</div>
+8
View File
@@ -0,0 +1,8 @@
@page
@{
ViewData["page-support"] = "Examples";
}
<h4>Examples</h4><br>
<p>This page contains some examples of what <b>Shell</b> can do.</p>
+28
View File
@@ -0,0 +1,28 @@
@page
@{
ViewData["page-support"] = "Examples \\ Taskbar";
//ViewData["meta-og:image"] = "/images/support/config.png";
}
<h5>Taskbar example</h5>
<pre class="syntax"><code>shell
{
var
{
hello_world = <span class="syntax-string">'Hello World!'</span>
}
dynamic
{
item(title=<span class="syntax-code">@@hello_world</span> cmd=<span class="syntax-code">@@msgbox(@@hello_world)</span>)
separator
item(title=<span class="syntax-string">'Command prompt'</span> cmd=<span class="syntax-string">'cmd.exe'</span> args=<span class="syntax-string">'/k echo </span><span class="syntax-code">@@hello_world</span><span class="syntax-string">'</span>)
separator
menu(title=<span class="syntax-string">'Sub menu'</span>)
{
item(title=<span class="syntax-string">'Open Paint'</span> cmd=<span class="syntax-string">'paint.exe'</span> arg=<span class="syntax-code">@@sel.path</span>)
separator
item(title=<span class="syntax-string">'Open Notepad'</span> cmd=<span class="syntax-string">'notepad.exe'</span> arg=<span class="syntax-string">'"</span><span class="syntax-code">@@sel.path</span><span class="syntax-string">"'</span>)
}
}
}</code></pre>
+9
View File
@@ -0,0 +1,9 @@
@page
@{
ViewData["page-support"] = "Expressions \\ Color";
}
<h4>Color literal</h4>
<br>
<h5>Hexadecimal Colors</h5>
<p>interprets color constants as hexadecimal if they are preceded by <code>#</code> and hexadecimal color is specified with: <code>#RRGGBB</code>, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between <code>00</code> and <code>FF</code>.<br/>For example, the <code>#0000FF</code> value is rendered as blue, because the blue component is set to its highest value (<code>FF</code>) and the others are set to <code>00</code>.<br/>There are 140 color names are predefined under the <a href="~/support/functions/color">color</a> scope.</p>
+58
View File
@@ -0,0 +1,58 @@
@page
@{
ViewData["page-support"] = "Expressions \\ Comments";
}
<h4>Comments</h4>
<p>Comments can be used to explain <b>Shell</b> code, and to make it more readable. It can also be used to prevent execution <b>Shell</b> code. Comments can be singled-lined or multi-lined.</p>
<div id="single-line">
<h5>Single-line Comments</h5>
<p>
Single-line comments start with two forward slashes (<code>//</code>).<br>
Any text between <code>//</code> and the end of the line is ignored by the compiler (will not be executed).
</p>
<p>This example uses a single-line comment before a line of code:</p>
<pre class="syntax"><code>shell
{
dynamic
{
<span class="syntax-comment">// This is a comment</span>
item(title=<span class="syntax-string">'Hello World!'</span>)
<span class="syntax-comment">//item(title='Hello World!')
}
}</code></pre>
<p>This example uses a single-line comment at the end of a line of code:</p>
<pre class="syntax"><code>shell
{
dynamic
{
item(title=<span class="syntax-string">'Hello World!'</span>) <span class="syntax-comment">// This is a comment</span>
}
}</code></pre>
</div>
<br>
<div id="multi-line">
<h5>Multi-line Comments</h5>
<p>
Multi-line comments start with <code>/*</code> and ends with <code>*/</code>.<br>
Any text between <code>/*</code> and <code>*/</code> will be ignored by the compiler:
</p>
<pre class="syntax"><code>shell
{
dynamic
{
item(title=<span class="syntax-string">'Hello,</span><span class="syntax-comment">/* multiple-lines comment inside */</span><span class="syntax-string"> world'</span>)
<span class="syntax-comment">/*
item(title='test item 1')
item(title='test item 2')
*/</span>
}
}</code></pre>
<p>
Single or multi-line comments?<br>
It is up to you which you want to use. Normally, we use <code>//</code> for short comments, and <code>/* */</code> for longer.
</p>
</div>
+9
View File
@@ -0,0 +1,9 @@
@page
@{
ViewData["page-support"] = "Expressions \\ Identifier";
}
<h4>Identifier</h4>
<br>
<p>The Identifier have unique titles described by fully qualified names that indicate a logical hierarchy.<br>The Identifier that has no parameters. Parentheses are added when necessary to separate:</p>
<p>There is a hierarchy of keywords in that some keywords are always followed by others.</p>
<pre><code>sel.path<br>sel.path().ext</code></pre>
+18
View File
@@ -0,0 +1,18 @@
@page
@{
ViewData["page-support"] = "Expressions";
}
<h4>Expressions</h4>
<br>
<p><b>Shell</b> provides a variety of statements and expressions. Most of these will be familiar to developers who have programmed in C, C++, C#.</p>
<p>Expressions gives you all the power of <b>Shell</b>, but is using a simplified syntax that's easier to learn if you're a beginner, and makes you more productive if you're an expert.</p>
<p>To use expressions, you write them by using proper syntax. Syntax is the set of rules by which the words and symbols in an expression are correctly combined. Initially, expressions in <b>Shell</b> are a little bit hard to read. But with a good understanding of expression syntax and a little practice, it becomes much easier.</p>
<ul>
<li>Expressions is non-case sensitive</li>
<li>Expressions (variables and functions) start with @@</li>
<li>blocks are enclosed in @@( ... )</li>
<li>Strings are enclosed with quotation marks or single quotation marks</li>
</ul>
@*interprets string as expressions if they are preceded by @@*@
+55
View File
@@ -0,0 +1,55 @@
@page
@{
ViewData["page-support"] = "Expressions \\ Numeric literal";
}
<h4>Numeric literals</h4>
<br>
<p>There are two types of numbers. Integer and floating point.</p>
<h5>Integer literals</h5>
<p>An integer is a numeric literal(associated with numbers) without any fractional or exponential part. There are two types of integer literals:</p>
<ol>
<li>Decimal literal (base 10)</li>
<li>Hexadecimal literal (base 16)</li>
</ol>
<p><strong>1. Decimal-literal(base 10):</strong><br>A non-zero decimal digit followed by zero or more decimal digits(0, 1, 2, 3, 4, 5, 6, 7, 8, 9).</p>
For example:<pre><code>Decimal: 0, -9, 22 etc</code></pre>
<p><strong>2. Hexadecimal-literal(base 16):</strong><br>0x followed by one or more hexadecimal digits(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f).</p>
For example:
<pre><code>Hexadecimal: 0x7f, 0x2a, 0x521 etc</code></pre>
<h5>Floating-point iterals</h5>
@*<p>A floating-point literal is a numeric literal that has either a fractional form or an exponent form. For example:</p>*@
<p>Floating-point literals specify values that must have a fractional part. These values contain decimal points (.)</p>
For example:
<pre><code>-2.0<br>0.0000234</code></pre>
@*
integer_literal
: decimal_integer_literal
| hexadecimal_integer_literal
decimal_integer_literal
: decimal_digit+ integer_type_suffix?
decimal_digit
: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
integer_type_suffix
: 'U' | 'u' | 'L' | 'l' | 'UL' | 'Ul' | 'uL' | 'ul' | 'LU' | 'Lu' | 'lU' | 'lu'
hexadecimal_integer_literal
: '0x' hex_digit+ integer_type_suffix?
| '0X' hex_digit+ integer_type_suffix?
hex_digit
: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
| 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f'
*@
@*JavaScript Numbers are Always 64-bit Floating Point
Unlike many other programming languages, JavaScript does not define different types of numbers, like integers, short, long, floating-point etc.
JavaScript numbers are always stored as double precision floating point numbers, following the international IEEE 754 standard.
This format stores numbers in 64 bits, where the number (the fraction) is stored in bits 0 to 51, the exponent in bits 52 to 62, and the sign in bit 63:*@
+193
View File
@@ -0,0 +1,193 @@
@page
@{
ViewData["page-support"] = "Expressions \\ Operators";
}
<div class="message is-danger">
<p class="message-body">Documentation under construction.</p>
</div>
<div id="operators">
<h4>Operators</h4>
<p>An operator is a symbol that tells to perform specific mathematical or logical manipulations. <b>Shell</b> is rich in built-in operators and provide the following types of operators</p>
<p>This chapter will examine the arithmetic, relational, logical, bitwise, assignment and other operators one by one.</p>
<h5 id="arithmetic">Arithmetic Operators</h5>
<p>The five arithmetical operations supported</p>
<table class="table table-bordered table-sm">
<tbody>
<tr>
<th class="text-center" width="10%">Operator</th>
<th>Description</th>
</tr>
<tr>
<td class="text-center">+</td>
<td>Addition</td>
</tr>
<tr>
<td class="text-center">-</td>
<td>Subtraction</td>
</tr>
<tr>
<td class="text-center">*</td>
<td>Multiplication</td>
</tr>
<tr>
<td class="text-center">/</td>
<td>Division</td>
</tr>
<tr>
<td class="text-center">%</td>
<td>Modulo</td>
</tr>
</tbody>
</table>
<br>
<h5 id="relational">Relational and comparison operators</h5>
<p>Two expressions can be compared using relational and equality operators. For example, to know if two values are equal or if one is greater than the other.</p>
<p>The result of such an operation is either true or false (i.e., a Boolean value).</p>
<p>The relational operators are:</p>
<table class="table table-bordered table-sm">
<tbody>
<tr>
<th class="text-center"width="10%">operator</th><th>description</th>
</tr>
<tr>
<td class="text-center">==</td><td>Equal to</td>
</tr>
<tr>
<td class="text-center">!=</td><td>Not equal to</td>
</tr>
<tr>
<td class="text-center">&lt;</td><td>Less than</td>
</tr>
<tr>
<td class="text-center">&gt;</td><td>Greater than</td>
</tr>
<tr>
<td class="text-center">&lt;=</td><td>Less than or equal to</td>
</tr>
<tr>
<td class="text-center">&gt;=</td><td>Greater than or equal to</td>
</tr>
</tbody>
</table>
<br>
<h5 id="logical">Logical Operators (!, ||, &amp;&amp;)</h5>
<p> The operator <code>!</code> is operator for the Boolean operation NOT. It has only one operand, to its right, and inverts it, producing false if its operand is true, and true if its operand is false. Basically, it returns the opposite Boolean value of evaluating its operand. For example:</p>
<p> The logical operators <code>&amp;&amp;</code> and <code>||</code> are used when evaluating two expressions to obtain a single relational result. The operator <code>&amp;&amp;</code> corresponds to the Boolean logical operation AND, which yields true if both its operands are true, and false otherwise. The following panel shows the result of operator <code>&amp;&amp;</code> evaluating the expression <code>a &amp;&amp; b</code>:</p>
<table class="table table-bordered table-sm">
<tbody>
<tr>
<th class="text-center" width="10%">operator</th>
<th>description</th>
</tr>
<tr>
<td class="text-center">&amp;&amp;</td>
<td>Called Logical AND operator. If both the operands are non-zero, then condition becomes true.</td>
</tr>
<tr>
<td class="text-center">||</td>
<td>Called Logical OR Operator. If any of the two operands is non-zero, then condition becomes true.</td>
</tr>
<tr>
<td class="text-center">!</td>
<td>
Called Logical NOT Operator. Use to reverses the logical state of its operand. If a condition is true, then Logical NOT operator will make false.
<pre><code>!(5 == 5) <cite>// evaluates to false because the expression at its right (5 == 5) is true</cite>
!(6 &lt;= 4) <cite>// evaluates to true because (6 &lt;= 4) would be false</cite>
!<var>true</var> <cite>// evaluates to false</cite>
!<var>false</var> <cite>// evaluates to true</cite></code></pre>
</td>
</tr>
</tbody>
</table>
<br>
<h5 id="ternary">Conditional ternary operator</h5>
<p>The conditional operator evaluates an expression, returning one value if that expression evaluates to true, and a different one if the expression evaluates as false. Its syntax is:</p>
<pre><code>condition ? result1 : result2</code></pre>
<p>If condition is true, the entire expression evaluates to result1, and otherwise to result2.</p>
<pre><code>7==5 ? 4 : 3 <cite>// evaluates to 3, since 7 is not equal to 5.</cite>
7==5+2 ? 4 : 3 <cite>// evaluates to 4, since 7 is equal to 5+2.</cite>
5>3 ? a : b <cite>// evaluates to the value of a, since 5 is greater than 3.</cite>
a>b ? a : b <cite>// evaluates to whichever is greater, a or b.</cite></code></pre>
<h5 id="bitwise">Bitwise Operators</h5>
<p>Bitwise operators modify variables considering the bit patterns that represent the values they store.</p>
<table class="table table-bordered table-sm">
<tbody>
<tr>
<th class="text-center" width="10%">Operator</th>
<th>Description</th>
</tr>
<tr>
<td class="text-center">&amp;</td>
</td><td>Bitwise AND</td>
</tr>
<tr>
<td class="text-center">|</td>
<td>Bitwise inclusive OR</td>
</tr>
<tr>
<td class="text-center">^</td>
<td>Bitwise exclusive OR</td>
</tr>
<tr>
<td class="text-center">~</td>
<td>Unary complement (bit inversion)</td>
</tr>
<tr>
<td class="text-center">&lt;&lt;</td>
<td>Shift bits left</td>
</tr>
<tr>
<td class="text-center">&gt;&gt;</td>
<td>Shift bits right</td>
</tr>
</tbody>
</table>
<h5 id="precedence">Precedence of operators</h5>
<p> A single expression may have multiple operators. For example:</p>
<pre><code>x = 5 + 7 % 2</code></pre>
<p>the above expression always assigns 6 to variable x, because the <code>%</code> operator has a higher precedence than the <code>+</code> operator, and is always evaluated before. Parts of the expressions can be enclosed in parenthesis to override this precedence order, or to make explicitly clear the intended effect. Notice the difference:</p>
<pre><code>x = 5 + (7 % 2) <cite>// x = 6 (same as without parenthesis)</cite>
x = (5 + 7) % 2 <cite>// x = 0</cite></code></pre>
<p>From greatest to smallest priority, Operators are evaluated in the following order:</p>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<th>Level</th>
<th>Precedence group</th>
<th>Operator</th>
<th>Description</th>
<th>Grouping</th>
</tr>
<tr>
<td rowspan="4">1</td>
<td rowspan="4">Postfix (unary)</td>
<td><code>++ --</code></td>
<td>postfix increment / decrement</td>
<td rowspan="4">Left-to-right</td>
</tr>
<tr><td><code>()</code></td><td>functional forms</td></tr>
<tr><td><code>[]</code></td><td>subscript</td></tr>
<tr><td><code>.</code></td><td>member access</td>
</tr>
<tr><td rowspan="3">2</td><td rowspan="3">Prefix (unary)</td><td><code>++ --</code></td><td>prefix increment / decrement</td><td rowspan="3">Right-to-left</td></tr>
<tr><td><code>~ !</code></td><td>bitwise NOT / logical NOT</td></tr>
<tr><td><code>+ -</code></td><td>unary prefix</td></tr>
<tr><td>4</td><td>Arithmetic: scaling</td><td><code>* / %</code></td><td>multiply, divide, modulo</td><td>Left-to-right</td></tr>
<tr><td>5</td><td>Arithmetic: addition</td><td><code>+ -</code></td><td>addition, subtraction</td><td>Left-to-right</td></tr>
<tr><td>6</td><td>Bitwise shift</td><td><code>&lt;&lt; &gt;&gt;</code></td><td>shift left, shift right</td><td>Left-to-right</td></tr>
<tr><td>7</td><td>Relational</td><td><code>&lt; &gt; &lt;= &gt;=</code></td><td>comparison operators</td><td>Left-to-right</td></tr>
<tr><td>8</td><td>Equality</td><td><code>== !=</code></td><td>equality / inequality</td><td>Left-to-right</td></tr>
<tr><td>9</td><td>And</td><td><code>&amp;</code></td><td>bitwise AND</td><td>Left-to-right</td></tr>
<tr><td>10</td><td>Exclusive or</td><td><code>^</code></td><td>bitwise XOR</td><td>Left-to-right</td></tr>
<tr><td>11</td><td>Inclusive or</td><td><code>|</code></td><td>bitwise OR</td><td>Left-to-right</td></tr>
<tr><td>12</td><td>Conjunction</td><td><code>&amp;&amp;</code></td><td>logical AND</td><td>Left-to-right</td></tr>
<tr><td>13</td><td>Disjunction</td><td><code>||</code></td><td>logical OR</td><td>Left-to-right</td></tr>
<tr><td rowspan="2">15</td><td rowspan="2">Assignment-level expressions</td><td><code>=</code></td><td>assignment</td><td rowspan="2">Right-to-left</td></tr>
<tr><td><code>?:</code></td><td>conditional operator</td></tr>
<tr><td>16</td><td>Sequencing</td><td><code>,</code></td><td>comma separator</td><td>Left-to-right</td></tr>
</tbody>
</table>
<p>When an expression has two operators with the same precedence level, grouping determines which one is evaluated first: either left-to-right or right-to-left.<br>
Enclosing all sub-statements in parentheses (even those unnecessary because of their precedence) improves code readability.</p>
</div>
+191
View File
@@ -0,0 +1,191 @@
@page
@{
ViewData["page-support"] = "Expressions \\ Operators";
}
<h4>Operators</h4>
<br>
<p>An operator is a symbol that tells to perform specific mathematical or logical manipulations. <b>Shell</b> is rich in built-in operators and provide the following types of operators</p>
<p>This chapter will examine the arithmetic, relational, logical, bitwise, assignment and other operators one by one.</p>
<h5 id="arithmetic">Arithmetic Operators</h5>
<p>The five arithmetical operations supported</p>
<table class="table">
<tbody>
<tr>
<th class="has-text-centered" width="10%">Operator</th>
<th>Description</th>
</tr>
<tr>
<td class="has-text-centered">+</td>
<td>Addition</td>
</tr>
<tr>
<td class="has-text-centered">-</td>
<td>Subtraction</td>
</tr>
<tr>
<td class="has-text-centered">*</td>
<td>Multiplication</td>
</tr>
<tr>
<td class="has-text-centered">/</td>
<td>Division</td>
</tr>
<tr>
<td class="has-text-centered">%</td>
<td>Modulo</td>
</tr>
</tbody>
</table>
<br>
<h5 id="relational">Relational and comparison operators</h5>
<p>Two expressions can be compared using relational and equality operators. For example, to know if two values are equal or if one is greater than the other.</p>
<p>The result of such an operation is either true or false (i.e., a Boolean value).</p>
<p>The relational operators are:</p>
<table class="table">
<tbody>
<tr>
<th class="has-text-centered"width="10%">operator</th><th>description</th>
</tr>
<tr>
<td class="has-text-centered">==</td><td>Equal to</td>
</tr>
<tr>
<td class="has-text-centered">!=</td><td>Not equal to</td>
</tr>
<tr>
<td class="has-text-centered">&lt;</td><td>Less than</td>
</tr>
<tr>
<td class="has-text-centered">&gt;</td><td>Greater than</td>
</tr>
<tr>
<td class="has-text-centered">&lt;=</td><td>Less than or equal to</td>
</tr>
<tr>
<td class="has-text-centered">&gt;=</td><td>Greater than or equal to</td>
</tr>
</tbody>
</table>
<br>
<h5 id="logical">Logical Operators (!, ||, &amp;&amp;)</h5>
<p> The operator <code>!</code> is operator for the Boolean operation NOT. It has only one operand, to its right, and inverts it, producing false if its operand is true, and true if its operand is false. Basically, it returns the opposite Boolean value of evaluating its operand. For example:</p>
<p> The logical operators <code>&amp;&amp;</code> and <code>||</code> are used when evaluating two expressions to obtain a single relational result. The operator <code>&amp;&amp;</code> corresponds to the Boolean logical operation AND, which yields true if both its operands are true, and false otherwise. The following panel shows the result of operator <code>&amp;&amp;</code> evaluating the expression <code>a &amp;&amp; b</code>:</p>
<table class="table">
<tbody>
<tr>
<th class="has-text-centered" width="10%">operator</th>
<th>description</th>
</tr>
<tr>
<td class="has-text-centered">&amp;&amp;</td>
<td>Called Logical AND operator. If both the operands are non-zero, then condition becomes true.</td>
</tr>
<tr>
<td class="has-text-centered">||</td>
<td>Called Logical OR Operator. If any of the two operands is non-zero, then condition becomes true.</td>
</tr>
<tr>
<td class="has-text-centered">!</td>
<td>
Called Logical NOT Operator. Use to reverses the logical state of its operand. If a condition is true, then Logical NOT operator will make false.
<pre><code>!(5 == 5) <cite>// evaluates to false because the expression at its right (5 == 5) is true</cite>
!(6 &lt;= 4) <cite>// evaluates to true because (6 &lt;= 4) would be false</cite>
!<var>true</var> <cite>// evaluates to false</cite>
!<var>false</var> <cite>// evaluates to true</cite></code></pre>
</td>
</tr>
</tbody>
</table>
<br>
<h5 id="ternary">Conditional ternary operator</h5>
<p>The conditional operator evaluates an expression, returning one value if that expression evaluates to true, and a different one if the expression evaluates as false. Its syntax is:</p>
<pre><code>condition ? result1 : result2</code></pre>
<p>If condition is true, the entire expression evaluates to result1, and otherwise to result2.</p>
<pre><code>7==5 ? 4 : 3 <cite>// evaluates to 3, since 7 is not equal to 5.</cite>
7==5+2 ? 4 : 3 <cite>// evaluates to 4, since 7 is equal to 5+2.</cite>
5>3 ? a : b <cite>// evaluates to the value of a, since 5 is greater than 3.</cite>
a>b ? a : b <cite>// evaluates to whichever is greater, a or b.</cite></code></pre>
<h5 id="bitwise">Bitwise Operators</h5>
<p>Bitwise operators modify variables considering the bit patterns that represent the values they store.</p>
<table class="table">
<tbody>
<tr>
<th class="has-text-centered" width="10%">Operator</th>
<th>Description</th>
</tr>
<tr>
<td class="has-text-centered">&amp;</td>
</td><td>Bitwise AND</td>
</tr>
<tr>
<td class="has-text-centered">|</td>
<td>Bitwise inclusive OR</td>
</tr>
<tr>
<td class="has-text-centered">^</td>
<td>Bitwise exclusive OR</td>
</tr>
<tr>
<td class="has-text-centered">~</td>
<td>Unary complement (bit inversion)</td>
</tr>
<tr>
<td class="has-text-centered">&lt;&lt;</td>
<td>Shift bits left</td>
</tr>
<tr>
<td class="has-text-centered">&gt;&gt;</td>
<td>Shift bits right</td>
</tr>
</tbody>
</table>
<h5 id="precedence">Precedence of operators</h5>
<p> A single expression may have multiple operators. For example:</p>
<pre><code>x = 5 + 7 % 2</code></pre>
<p>the above expression always assigns 6 to variable x, because the <code>%</code> operator has a higher precedence than the <code>+</code> operator, and is always evaluated before. Parts of the expressions can be enclosed in parenthesis to override this precedence order, or to make explicitly clear the intended effect. Notice the difference:</p>
<pre><code>x = 5 + (7 % 2) <cite>// x = 6 (same as without parenthesis)</cite>
x = (5 + 7) % 2 <cite>// x = 0</cite></code></pre>
<p>From greatest to smallest priority, Operators are evaluated in the following order:</p>
<table class="table">
<tbody>
<tr>
<th>Level</th>
<th>Precedence group</th>
<th>Operator</th>
<th>Description</th>
<th>Grouping</th>
</tr>
<tr>
<td rowspan="4">1</td>
<td rowspan="4">Postfix (unary)</td>
<td><code>++ --</code></td>
<td>postfix increment / decrement</td>
<td rowspan="4">Left-to-right</td>
</tr>
<tr><td><code>()</code></td><td>functional forms</td></tr>
<tr><td><code>[]</code></td><td>subscript</td></tr>
<tr><td><code>.</code></td><td>member access</td>
</tr>
<tr><td rowspan="3">2</td><td rowspan="3">Prefix (unary)</td><td><code>++ --</code></td><td>prefix increment / decrement</td><td rowspan="3">Right-to-left</td></tr>
<tr><td><code>~ !</code></td><td>bitwise NOT / logical NOT</td></tr>
<tr><td><code>+ -</code></td><td>unary prefix</td></tr>
<tr><td>4</td><td>Arithmetic: scaling</td><td><code>* / %</code></td><td>multiply, divide, modulo</td><td>Left-to-right</td></tr>
<tr><td>5</td><td>Arithmetic: addition</td><td><code>+ -</code></td><td>addition, subtraction</td><td>Left-to-right</td></tr>
<tr><td>6</td><td>Bitwise shift</td><td><code>&lt;&lt; &gt;&gt;</code></td><td>shift left, shift right</td><td>Left-to-right</td></tr>
<tr><td>7</td><td>Relational</td><td><code>&lt; &gt; &lt;= &gt;=</code></td><td>comparison operators</td><td>Left-to-right</td></tr>
<tr><td>8</td><td>Equality</td><td><code>== !=</code></td><td>equality / inequality</td><td>Left-to-right</td></tr>
<tr><td>9</td><td>And</td><td><code>&amp;</code></td><td>bitwise AND</td><td>Left-to-right</td></tr>
<tr><td>10</td><td>Exclusive or</td><td><code>^</code></td><td>bitwise XOR</td><td>Left-to-right</td></tr>
<tr><td>11</td><td>Inclusive or</td><td><code>|</code></td><td>bitwise OR</td><td>Left-to-right</td></tr>
<tr><td>12</td><td>Conjunction</td><td><code>&amp;&amp;</code></td><td>logical AND</td><td>Left-to-right</td></tr>
<tr><td>13</td><td>Disjunction</td><td><code>||</code></td><td>logical OR</td><td>Left-to-right</td></tr>
<tr><td rowspan="2">15</td><td rowspan="2">Assignment-level expressions</td><td><code>=</code></td><td>assignment</td><td rowspan="2">Right-to-left</td></tr>
<tr><td><code>?:</code></td><td>conditional operator</td></tr>
<tr><td>16</td><td>Sequencing</td><td><code>,</code></td><td>comma separator</td><td>Left-to-right</td></tr>
</tbody>
</table>
<p>
When an expression has two operators with the same precedence level, grouping determines which one is evaluated first: either left-to-right or right-to-left.<br>
Enclosing all sub-statements in parentheses (even those unnecessary because of their precedence) improves code readability.
</p>
+51
View File
@@ -0,0 +1,51 @@
@page
@{
ViewData["page-support"] = "Expressions \\ String literal";
}
<h4>String literal</h4>
<br>
<p>string is zero or more characters written inside single or double quotes.</p>
<p>You can use quotes inside a string, as long as they don't match the quotes surrounding the string:</p>
<pre class="syntax"><code>var
{
var1 = <span class="syntax-string">"It's alright"</span>
var2 = <span class="syntax-string">"He is called 'Johnny'"</span>
var3 = <span class="syntax-string">'He is called "Johnny"'</span>
}</code></pre>
<br>
<h5>Single quotes</h5>
<br>
<p>single quotes allow you to use the syntax of expressions within them.<br/>The <code>@@</code> sign must be placed before the expressions.</p>
<pre><code>dynamic
{
item(title = 'windows dir path: @@sys.dir')
}</code></pre>
<br>
<h5>Double quotes</h5>
<br>
<p>double quotes allow you to use the Escape Character inside them only.<br/>The backslash (<code>\</code>) escape character turns special characters into characters.<br/>The sequence <code>\" </code> inserts a double quote in a string:</p>
<pre><code>var
{
var1 = "hello\"world"
// result: hello"world
}</code></pre>
<p>The complete set of escape sequences is as follows:</p>
<table class="table">
<tbody>
<tr><td>\'</td><td>Single quote</td></tr>
<tr><td>\"</td><td>Double quote</td></tr>
<tr><td>\\</td><td>Backslash</td></tr>
<tr><td>\0</td><td>Null</td></tr>
<tr><td>\a</td><td>Alert</td></tr>
<tr><td>\b</td><td>Backspace</td></tr>
<tr><td>\f</td><td>Form Feed</td></tr>
<tr><td>\n</td><td>New Line</td></tr>
<tr><td>\r</td><td>Carriage Return</td></tr>
<tr><td>\t</td><td>Horizontal Tab</td></tr>
<tr><td>\v</td><td>Vertical Tab</td></tr>
<tr><td>\uxxxx</td><td>Unicode escape sequence (UTF-16) \uHHHH (range: 0000 - FFFF)</td></tr>
<tr><td>\xnnnn</td><td>Unicode escape sequence for character with hex value nnnn (variable length version of \uxxxx)</td></tr>
<tr><td>\Uxxxxxxxx</td><td>Unicode escape sequence (UTF-32) \U00HHHHHH (range: 000000 - 10FFFF)</td></tr>
</tbody>
</table>
+20
View File
@@ -0,0 +1,20 @@
@page
@{
ViewData["page-support"] = "Functions \\ APP";
}
<h5>APP</h5>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<pre>
app.about
app.cfg
app.directory(dir)
app.dll
app.exe
app.is64
app.name
app.reload
app.unload
app.version(var)
</pre>
+153
View File
@@ -0,0 +1,153 @@
@page
@{
ViewData["page-support"] = "Functions \\ COLOR";
}
<h5>COLOR</h5>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<pre>
color.default
color.accent
color.aliceblue
color.antiquewhite
color.aqua
color.aquamarine
color.azure
color.beige
color.bisque
color.black
color.blanchedalmond
color.blue
color.blueviolet
color.brown
color.burlywood
color.cadetblue
color.chartreuse
color.chocolate
color.coral
color.cornflowerblue
color.cornsilk
color.crimson
color.cyan
color.darkblue
color.darkcyan
color.darkgoldenrod
color.darkgray
color.darkgreen
color.darkkhaki
color.darkmagenta
color.darkolivegreen
color.darkorange
color.darkorchid
color.darkred
color.darksalmon
color.darkseagreen
color.darkslateblue
color.darkslategray
color.darkturquoise
color.darkviolet
color.deeppink
color.deepskyblue
color.dimgray
color.dodgerblue
color.firebrick
color.floralwhite
color.forestgreen
color.fuchsia
color.gainsboro
color.ghostwhite
color.gold
color.goldenrod
color.gray
color.green
color.greenyellow
color.honeydew
color.hotpink
color.indianred
color.indigo
color.ivory
color.khaki
color.lavender
color.lavenderblush
color.lawngreen
color.lemonchiffon
color.lightblue
color.lightcoral
color.lightcyan
color.lightgoldenrodyellow
color.lightgray
color.lightgreen
color.lightpink
color.lightsalmon
color.lightseagreen
color.lightskyblue
color.lightslategray
color.lightsteelblue
color.lightyellow
color.lime
color.limegreen
color.linen
color.magenta
color.maroon
color.mediumaquamarine
color.mediumblue
color.mediumorchid
color.mediumpurple
color.mediumseagreen
color.mediumslateblue
color.mediumspringgreen
color.mediumturquoise
color.mediumvioletred
color.midnightblue
color.mintcream
color.mistyrose
color.moccasin
color.navajowhite
color.navy
color.oldlace
color.olive
color.olivedrab
color.orange
color.orangered
color.orchid
color.palegoldenrod
color.palegreen
color.paleturquoise
color.palevioletred
color.papayawhip
color.peachpuff
color.peru
color.pink
color.plum
color.powderblue
color.purple
color.red
color.rosybrown
color.royalblue
color.saddlebrown
color.salmon
color.sandybrown
color.seagreen
color.seashell
color.sienna
color.silver
color.skyblue
color.slateblue
color.slategray
color.snow
color.springgreen
color.steelblue
color.tan
color.teal
color.thistle
color.tomato
color.transparent
color.turquoise
color.violet
color.wheat
color.white
color.whitesmoke
color.yellow
color.yellowgreen
</pre>
+40
View File
@@ -0,0 +1,40 @@
@page
@{
ViewData["page-support"] = "Functions \\ IO";
}
<h5>IO</h5>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<pre>
io.attribute.archive
io.attribute.compressed
io.attribute.device
io.attribute.directory
io.attribute.encrypted
io.attribute.hidden
io.attribute.invalid
io.attribute.normal
io.attribute.offline
io.attribute.readonly
io.attribute.sparsefile
io.attribute.system
io.attribute.temporary
io.attribute.virtual
io.attributes
io.copy
io.delete
io.directory
io.dir.make
io.file.append
io.file.create
io.file.make
io.file.read
io.file.size
io.file.write
io.move
io.rename
</pre>
@*If the help function is passed without an argument, then the interactive help utility starts up on the console.
The help function has the following syntax:*@
+20
View File
@@ -0,0 +1,20 @@
@page
@{
ViewData["page-support"] = "Functions \\ APP";
}
<h5>APP</h5>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<pre>
app.about
app.cfg
app.directory(dir)
app.dll
app.exe
app.is64
app.name
app.reload
app.unload
app.version(var)
</pre>
+111
View File
@@ -0,0 +1,111 @@
@page
@{
ViewData["page-support"] = "Functions";
}
<h4>Functions</h4>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<p>The functions and variables have unique titles described by fully qualified names that indicate a logical hierarchy.</p>
<p><b>Shell</b> has a number of functions and variables built into it that are always available. They are listed here in alphabetical order.</p>
<ul class="is-unstyled">
<li><a href="~/docs/functions/app">app</a></li>
<li><a href="~/docs/functions/color">color</a></li>
<li><a href="~/docs/functions/io">io</a></li>
<li><a href="~/docs/functions/key">key</a></li>
<li><a href="~/docs/functions/msg">msg</a></li>
<li><a href="~/docs/functions/path">path</a></li>
<li><a href="~/docs/functions/reg">reg</a></li>
<li><a href="~/docs/functions/sel">sel</a></li>
<li><a href="~/docs/functions/str">str</a></li>
<li><a href="~/docs/functions/sys">sys</a></li>
<li><a href="~/docs/functions/user">user</a></li>
</ul>
<pre>
if
for
foreach
equal
greater
less
shl
shr
char
not
print
quote
tohex
null
var
</pre>
<h5>Keyword</h5>
<pre>
break
continue
null
bool
true
false
auto
none
inherit
parent
both
top
bottom
hidden
normal
show
visible
minimized
maximized
vis.disable
vis.hidden
mode.none
mode.single
mode.multiple
mode.multiunique
mode.multisingle
mode.multi
type.desktop
type.directory(dir)
type.drive
type.dvd
type.file
type.fixed
type.namespace
type.remote
type.unknown
type.usb
type.vhd
cmd
cmd.hidden
cmd.show
cmd.visible
cmd.normal
cmd.maximized
cmd.minimized
draw
draw.rect
draw.str
draw.glyph
draw.symbol
draw.circle
icon
glyph
image
image.icon
image.res
image.str
image.glyph
image.symbol
image.rect
</pre>
+66
View File
@@ -0,0 +1,66 @@
@page
@{
ViewData["page-support"] = "Functions \\ KEY";
}
<h5>KEY</h5>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<pre>
key
key.alt
key.apps
key.back
key.cancel
key.capital
key.capslock
key.control
key.delete
key.down
key.end
key.enter
key.escape
key.execute
key.f1
key.f10
key.f11
key.f12
key.f2
key.f3
key.f4
key.f5
key.f6
key.f7
key.f8
key.f9
key.help
key.home
key.insert
key.lalt
key.lcontrol
key.left
key.lshift
key.lwin
key.next
key.none
key.pagedown
key.pageup
key.pause
key.play
key.print
key.printscreen
key.prior
key.ralt
key.rcontrol
key.return
key.right
key.rshift
key.rwin
key.shift
key.snapshot
key.space
key.tab
key.up
key.win
</pre>
+119
View File
@@ -0,0 +1,119 @@
@page
@{
ViewData["page-support"] = "Functions \\ MSG";
}
<h4>MSG</h4>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<p>Displays a modal dialog box that contains a system icon, a set of buttons, and a brief application-specific message, such as status or error information. The message box returns an integer value that indicates which button the user clicked.</p>
<h5>Syntax</h5>
<pre>
msg(text)
msg(text, title)
msg(text, title, flags)
</pre>
<br>
<h5>Parameters</h5>
<table class="table table-borderless">
<tr>
<td class="kw">text</td>
<td>The message to be displayed.</td>
</tr>
<tr>
<td class="kw">title</td>
<td>The dialog box title. If this parameter is NULL, the default title is <b>Nilesoft Shell</b>.</td>
</tr>
<tr>
<td class="kw">flags</td>
<td>The contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups of flags.</td>
</tr>
</table>
<h5>Flags</h5>
<br>
<h5>To display an icon in the message box, specify one of the following values.</h5>
<dl>
<dt>msg.error</dt>
<dd>A stop-sign icon appears in the message box.</dd>
<dt>msg.question</dt>
<dd>A question-mark icon appears in the message box.</dd>
<dt>msg.warning</dt>
<dd>An exclamation-point icon appears in the message box.</dd>
<dt>msg.info</dt>
<dd>An icon consisting of a lowercase letter i in a circle appears in the message box.</dd>
</dl
<br>
<h5>To indicate the buttons displayed in the message box, specify one of the following values.</h5>
<dl class="keyword">
<dt>msg.ok</dt>
<dd>The message box contains one push button: OK. This is the default.</dd>
<dt>msg.okcancel</dt>
<dd>The message box contains two push buttons: OK and Cancel.</dd>
<dt>msg.yesnocancel</dt>
<dd>The message box contains three push buttons: Yes, No, and Cancel.</dd>
<dt>msg.yesno</dt>
<dd>The message box contains two push buttons: Yes and No.</dd>
</dl>
<br>
<h5>To indicate the default button, specify one of the following values.</h5>
<dl>
<dt>msg.defbutton1</dt>
<dd>The first button is the default button.</dd>
<dt>msg.defbutton2</dt>
<dd>The second button is the default button.</dd>
<dt>msg.defbutton3</dt>
<dd>The third button is the default button.</dd>
</dl>
<br>
<h5>To indicate the modality of the dialog box, specify one of the following values.</h5>
<dl>
<dt>msg.applmodal</dt>
<dd>The user must respond to the message box before continuing work in the current window. However, the user can move to the windows of other threads and work in those windows.</dd>
<dt>msg.taskmodal</dt>
<dd></dd>Same as msg.applmodal except that all the top-level windows belonging to the current thread are disabled. </dd>
</dl>
<br>
<h5>To specify other options, use one or more of the following values.</h5>
<dl>
<dt>msg.right</dt>
<dd>The text is right-justified.</dd>
<dt>msg.rtlreading</dt>
<dd>Displays message and caption text using right-to-left reading order on Hebrew and Arabic systems.</dd>
<dt>msg.setforeground</dt>
<dd>The message box becomes the foreground window.</dd>
<dt>msg.topmost</dt>
<dd></dd>
</dl>
<br>
<h5>Return value</h5>
<p>If a message box has a Cancel button, the function returns the <code>msg.idcancel</code> value if either the <kbd>ESC</kbd> key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing <kbd>ESC</kbd> will no effect - unless an <code>msg.ok</code> button is present. If an <code>msg.ok</code> button is displayed and the user presses <kbd>ESC</kbd>, the return value will be <code>msg.idok</code>.</p>
<p>If the function fails, the return value is zero.<br>
If the function succeeds, the return value is one of the following values:
<dl>
<dt>msg.idok or 1</dt>
<dd>The OK button was selected.</dd>
<dt>msg.idcancel or 2</dt>
<dd>The Cancel button was selected.</dd>
<dt>msg.idyes or 6</dt>
<dd>The Yes button was selected.</dd>
<dt>msg.idno or 7</dt>
<dd>The No button was selected.</dd>
</dl>
</p>
<h5>Examples</h5>
<pre class="syntax"><code>msg("Hello, Warld!","NileSoft Shell", msg.info | msg.ok)<br>
msg("Hello, Warld!","NileSoft Shell")<br>
msg("Hello, Warld!")</code></pre>
+50
View File
@@ -0,0 +1,50 @@
@page
@{
ViewData["page-support"] = "Functions \\ PATH";
}
<h5>PATH</h5>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<pre>
path.absolute
path.combine
path.currentdirectory(curdir)
path.directory(dir)
path.directory.box
path.directory.make
path.directory.name
path.directory.title
path.empty
path.exists
path.file
path.file.box
path.file.ext
path.file.name
path.file.title
path.full
path.getknownfolder
path.isabsolute
path.isclsid
path.isdirectory
path.isdrive
path.isexe
path.isfile
path.isnamespace
path.isrelative
path.isroot
path.join
path.lnk
path.lnktarget
path.name
path.parent
path.parent.name
path.relative
path.removeextension
path.root
path.short
path.title
path.type
</pre>
+23
View File
@@ -0,0 +1,23 @@
@page
@{
ViewData["page-support"] = "Functions \\ REG";
}
<h5>REG</h5>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<pre>
reg(...)
reg.cr
reg.cu
reg.lm
reg.u
reg.cc
reg.none
reg.sz
reg.expand
reg.binary
reg.multi
reg.dword
reg.qword
</pre>
File diff suppressed because it is too large. Load diff
+35
View File
@@ -0,0 +1,35 @@
@page
@{
ViewData["page-support"] = "Functions \\ STR";
}
<h5>STR</h5>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<pre>
str.at
str.char
str.contains
str.empty
str.end
str.equals
str.find
str.findlast
str.format
str.left
str.length
str.lower
str.not
str.null
str.padleft
str.padright
str.remove
str.replace
str.right
str.start
str.sub
str.trim
str.trimend
str.trimstart
str.upper
</pre>
+60
View File
@@ -0,0 +1,60 @@
@page
@{
ViewData["page-support"] = "Functions \\ SYS";
}
<h5>SYS (SYSTEM)</h5>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<pre>
sys.appdata
sys.beep
sys.bin
sys.bin32
sys.bin64
sys.copy
sys.dark
sys.datetime
sys.datetime.date
sys.datetime.date_day
sys.datetime.date_dayofweek
sys.datetime.date_month
sys.datetime.date_y
sys.datetime.date_year
sys.datetime.date_yy
sys.datetime.short
sys.datetime.time
sys.datetime.time_hour
sys.datetime.time_milliseconds
sys.datetime.time_min
sys.datetime.time_minute
sys.datetime.time_ms
sys.datetime.time_pm
sys.datetime.time_second
sys.directory(dir)
sys.extended
sys.is64
sys.name
sys.path
sys.prog
sys.prog32
sys.programdata
sys.random
sys.refresh
sys.root
sys.temp
sys.templates
sys.toggleext
sys.togglehidden
sys.type
sys.users
sys.var
sys.version(ver)
sys.version.build
sys.version.major
sys.version.minor
sys.version.name
sys.version.type
sys.wow
</pre>
+32
View File
@@ -0,0 +1,32 @@
@page
@{
ViewData["page-support"] = "Functions \\ USER";
}
<h5>USER</h5>
<div class="notification is-danger is-light">
Documentation under construction.
</div>
<pre>
user.home
user.appdata
user.contacts
user.desktop
user.directory(dir)
user.documents
user.documentslibrary
user.downloads
user.favorites
user.libraries
user.localappdata
user.music
user.name
user.personal
user.pictures
user.profile
user.quicklaunch
user.sendto
user.startmenu
user.temp
user.templates
user.videos
</pre>
+34
View File
@@ -0,0 +1,34 @@
@page
@{
ViewData["page-support"] = "Getting started";
ViewData["meta-og:image"] = "/images/support/helloworld.png";
}
<h4>Get Started</h4>
<br>
<p>
This tutorial will teach you the basics of <b>Shell</b>.<br>
It is not necessary to have any prior experience.
</p>
<p>
To start using <b>Shell</b>, you need:<br>
A text editor, like Notepad, to write <b>Shell</b> code.
</p>
<h5>Quickstart</h5>
<p>Let's create our first menu item.</p>
<p>Open configuration file (shell.shl) and Write the following code and save.</p>
<pre class="syntax"><code>shell
{
dynamic
{
item(title=<span class="syntax-string">'Hello, World!'</span>)
}
}</code></pre>
<p>Don't worry if you don't understand the code above - we will discuss it in detail in later chapters.</p>
<p>The result will look something for this when you press the right-click in an empty place on the desktop:</p>
<div class="has-text-centered my-5">
<a class="lightbox">
<img src="~/images/support/helloworld.png">
</a>
</div>
<p><strong>Congratulations</strong> You have now added the first time a menu item to the context menu</p>
+46
View File
@@ -0,0 +1,46 @@
@page
@{
ViewData["page-support"] = "Introduction";
ViewData["meta-og:image"] = "/images/screenshots/goto.png";
}
@*The home for Shell documentation and learning for users.*@
@*<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li><a href="#">Bulma</a></li>
<li><a href="#">Documentation</a></li>
<li><a href="#">Components</a></li>
<li class="is-active"><a href="#" aria-current="page">Breadcrumb</a></li>
</ul>
</nav>*@
<h4>Introduction</h4>
<br>
<h5>What is Shell?</h5>
<p>
<b>Shell</b> is a extensions of Windows File Explorer that can be used to create high-performance context menu items.
and gives user a high level of control over context menu of Windows File Explorer.
</p>
<p>The Right Click Menu or the Context Menu is the menu, which appears when you right-click on the desktop, file, folder or taskbar in Windows. This menu gives you added functionality by offering you actions you can take with the item</p>
<p><b>Shell</b> is all you need to customize or add new items with several functions to Windows File Explorer Context menu and Much More.(cascade menus, advanced menus, multi-level menus, command menus, separator).</p>
<div class="has-text-centered my-5">
<a class="lightbox">
<img src="~/images/screenshots/goto.png">
</a>
</div>
<h5>Why Use Shell</h5>
<ul>
<li>Is portable, fun and easy to learn!.</li>
<li>Small installation file.</li>
<li>Clean and simple user interface.</li>
<li>Configuration in plain text.</li>
<li>Quick loading.</li>
<li>Minimal resource usage.</li>
<li>No limitations.</li>
<li>Embedded expressions syntax.</li>
<li>Built-in functions and predefined variables.</li>
<li>Multiple sources of images (embedded icons, image files, glyphs and colors).</li>
<li>Dynamic search and filter.</li>
<li>Support Taskbar context menu.</li>
<li>Full management of the context menu.</li>
</ul>
+56
View File
@@ -0,0 +1,56 @@
@page
@{
ViewData["page-support"] = "Installation";
}
<h4>Installation</h4>
<br>
<p>Download the release package and unzip its content in any location you want.</p>
@*<p>Open a command prompt with administrative permissions.</p>*@
<p>Open an elevated command prompt.</p>
<div class="alert alert-primary" role="alert">Administrative permissions required for installation</div>
<h5>Command-Line Help</h5><br>
<code>shell -[options]</code>
<br><br>
<h5>Options</h5>
<table class="table table-sm">
<tr>
<td class="syntax-keyword w-25">-register (-r)</td>
<td>Registering.</td>
</tr>
<tr>
<td class="syntax-keyword">-unregister (-u)</td>
<td>Unregistering.</td>
</tr>
<tr>
<td class="syntax-keyword">-init (-i)</td>
<td>Initialize images cache.</td>
</tr>
<tr>
<td class="syntax-keyword">-restart (-re)</td>
<td>Restart Windows Explorer.</td>
</tr>
<tr>
<td class="syntax-keyword">-silent (-s)</td>
<td>Prevents displaying messages.@*Silent, do not display any dialogue boxes*@</td>
</tr>
<tr>
<td class="syntax-keyword">-?</td>
<td>Dispay this help message.</td>
</tr>
</table>
<div id="intsall">
<h5>Intsall</h5>
<code>shell -register -init</code>
</div>
<hr>
<div id="unintsall">
<h5>Unintsall</h5>
<code>shell -unregister -restart</code>
<br>
<p class="mt-5"><i>Tip:</i> Close all instances of Windows File Explorer before uninstalling to avoid needing a reboot after it has been uninstalled.</p>
@* <br><br>
<h2>How To Uninstall Shell installer</h2>
<p><b>Shell</b> installer can be fully removed from your system by using the standard Windows uninstall mechanism.</p>
<p>The way this is done depends on your version of Windows.</p>
*@
File diff suppressed because it is too large. Load diff
+127
View File
@@ -0,0 +1,127 @@
@page
@{
ViewData["title"] = "Syntax";
ViewData["page-support"] = "Syntax";
ViewData["meta-og:image"] = "/images/support/config.png";
}
<h4>Syntax Rules for Configuration Files</h4>
<br>
<p>This chapter describes the syntax rules for configuration file.</p>
<ul>
<li>Syntax are not case sensitive.</li>
<li>Spaces around the equal (<code>=</code>) sign are optional and are ignored.</li>
<li>The properties of static and dynamic items are separated by blank spaces or on a separate line and must be placed in parentheses <code>( )</code>.</li>
<li>Static items are optional.</li>
<li>Static items have one type: item.</li>
<li>Dynamic items are optional.</li>
<li>Dynamic items have three types: menu, item, and separator(sep).</li>
</ul>
<p><i>Tip:</i> When there is an error, it is recorded in the log file (shell.log).</p>
@*<p>You can place any number of varabiles in an menu.
varabiles can be placed in the var, or in the dynamic body section of an menu, or in both.</p>*@
<p>The following rules apply to the syntax of configuration file (shell.shl):</p>
<h5>shell.shl structure</h5>
<pre class="syntax"><code>shell
{
<span class="syntax-comment">// global variables</span>
var
{
<span class="syntax-comment">// variables content</span>
variable-name = variable-value
...
}
<span class="syntax-comment">// static items</span>
static
{
<span class="syntax-comment">// static items content</span>
item ( property-name = property-value ... )
...
}
<span class="syntax-comment">// dynamic items</span>
dynamic
{
<span class="syntax-comment">// dynamic items content</span>
item ( property-name = property-value ... )
separator [( property-name = property-value ... )]
menu ( property-name = property-value ... )
{
var <span class="syntax-comment">// local variables</span>
{
variable-name = variable-value
...
}
item ( property-name = property-value ... )
...
}
...
}
}</code></pre>
<br>
<p><b>Breaking Long Lines</b><br>For best readability, users often like to avoid lines longer than 80 characters. single quotes also allow break up a line.</p>
<pre class="syntax"><code>shell
{
dynamic
{
item(title=<span class="syntax-string">'Command prompt'</span>
cmd=<span class="syntax-string">'cmd.exe'</span>)
}
}</code></pre>
@*<br>
<h5 class="mt-5">Example</h5>
<pre class="syntax"><code>shell
{
var
{
hello_world = <span class="syntax-string">'Hello World!'</span>
}
static
{
<span class="syntax-comment">// remove items</span>
item(find=<span class="syntax-string">'restore'</span> vis=<span class="syntax-keyword">hidden</span>)
item(find=<span class="syntax-string">'give access to'</span> vis=<span class="syntax-keyword">hidden</span>)
<span class="syntax-comment">// show only on extended with shift key</span>
item(find=<span class="syntax-string">'send to'</span> vis=<span class="syntax-keyword">extended</span>)
item(find=<span class="syntax-string">'new'</span> vis=<span class="syntax-keyword">extended</span>)
<span class="syntax-comment">// remove or extend multiple items by one line</span>
item(find=<span class="syntax-string">'delete|format|rename|paste'</span> vis=<span class="syntax-keyword">extended</span>)
<span class="syntax-comment">// change title</span>
item(find=<span class="syntax-string">'defender'</span> title=<span class="syntax-string">'Scan with Defender'</span>)
<span class="syntax-comment">// change image</span>
item(find=<span class="syntax-string">'copy'</span> image=<span class="syntax-number">#dd0000</span>)
<span class="syntax-comment">// change image, title</span>
item(find=<span class="syntax-string">'open with'</span> image=<span class="syntax-number">#dd0000</span> title=<span class="syntax-string">'Open...'</span>)
}
dynamic
{
item(title=<span class="syntax-code">@@hello_world</span> cmd=<span class="syntax-code">@@msg(hello_world)</span>)
separator
item(title=<span class="syntax-string">'Command prompt'</span> cmd=<span class="syntax-string">'cmd.exe'</span> args=<span class="syntax-string">'/k echo </span><span class="syntax-code">@@hello_world</span><span class="syntax-string">'</span>)
separator
menu(title=<span class="syntax-string">'Sub menu'</span>)
{
item(title=<span class="syntax-string">'Open Paint'</span> cmd=<span class="syntax-string">'paint.exe'</span> arg=<span class="syntax-code">@@sel.path</span>)
separator
item(title=<span class="syntax-string">'Open Notepad'</span> cmd=<span class="syntax-string">'notepad.exe'</span> arg=<span class="syntax-string">'"</span><span class="syntax-code">@@sel.path</span><span class="syntax-string">"'</span>)
}
}
}</code></pre>
<div class="has-text-centered my-5">
<a class="lightbox">
<img class="is-256" src="~/images/support/config.png">
</a>
</div>*@
+198
View File
@@ -0,0 +1,198 @@
@page
@{
ViewData["title"] = "Static Items";
ViewData["page-support"] = "Variables";
}
<h4>Static Items</h4>
<br>
<p>This section modifies context menu items added by the system or by a third party. more than one item can be added with some properties to customize the context menu. explained below in more details.<br>The items must have the property <code>find</code>. to search in the titles of the menu items to catches them and customize by other properties such as changing the title, icon, visibility, or moving it to another location.</p>
<p>In the following example, it shows how to write add an items to static:</p>
<pre class="syntax"><code>shell
{
static
{
item(find = <span class="syntax-string">'copy'</span> image = <span class="syntax-number">#00ff00</span>)
item(find = <span class="syntax-string">'paste'</span> image = <span class="syntax-number">#0000ff</span>)
}
}</code></pre>
<br>
<br>
<h4>Properties</h4>
<div class="table-container">
<table class="table">
<thead>
<tr>
<th scope="col">Property</th>
<th scope="col">Summary</th>
</tr>
</thead>
<tbody>
<tr>
<td>Find</td>
<td>Accept menuitem when the specific menuitem title is contains or equal to the current find property.<br>Use this delimiter <code>|</code> to separate patterns.
<p class="has-text-danger">This property must be included with another property at least.</p>
Default = <span class="syntax-keyword">null</span>
</td>
</tr>
<tr>
<td>Title</td>
<td>
<p>Change value indicating the caption of the menuitem.</p>
Default = <span class="syntax-keyword">null</span>
</td>
</tr>
<tr>
<td>Mode</td>
<td>Accept item by selections behavior. Value have one of the following parameters:
<table class="table">
<tr>
<td class="syntax-keyword">None</td>
<td>Accept item when there are no selections.</td>
</tr>
<tr>
<td class="syntax-keyword">Single</td>
<td>Accept menuitem when there are single selection.</td>
</tr>
<tr>
<td class="syntax-keyword">MultiUnique</td>
<td>Accept when multiple selections are single type.</td>
</tr>
<tr>
<td class="syntax-keyword">MultiSingle</td>
<td>Accept when multiple selections are single file extension.</td>
</tr>
<tr>
<td class="syntax-keyword">Multiple</td>
<td>Accept all types.</td>
</tr>
</table>
Default = <span class="syntax-keyword">single</span>
</td>
</tr>
<tr>
<td>Visibility (vis)</td>
<td>Visibility of menuitem and can have one of the following parameters:.
<table class="table">
<tr>
<td class="syntax-keyword">Hidden</td>
<td>Hide the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Enable, Normal</td>
<td>Enabled the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Disable</td>
<td>Disabled the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Extended</td>
<td>The menuitem appears when the <kbd>Shift</kbd> key is pressed.</td>
</tr>
<tr>
<td class="syntax-keyword">ExtendedHidden</td>
<td>Hide the menuitem when the <kbd>Shift</kbd> key is pressed.</td>
</tr>
<tr>
<td class="syntax-keyword">ExtendedDisable</td>
<td>The item appears disabled when the <kbd>Shift</kbd> key is pressed.</td>
</tr>
</table>
Default = <span class="syntax-keyword">normal</span>
</td>
</tr>
<tr>
<td>Position (pos)</td>
<td>The position at which a menuitem should be inserted into the menu.<br/>Position can have one of the following parameters:
<table class="table">
<tr>
<td class="syntax-keyword">Auto</td>
<td>Insert the menuitem to the current position.</td>
</tr>
<tr>
<td class="syntax-keyword">Middle</td>
<td>Insert the menuitem to the middle of the menu.</td>
</tr>
<tr>
<td class="syntax-keyword">Top</td>
<td>Insert the menuitem to the top of the menu.</td>
</tr>
<tr>
<td class="syntax-keyword">Bottom</td>
<td>Insert the menuitem to the bottom of the menu.</td>
</tr>
<tr>
<td class="syntax-keyword">Number sets</td>
<td>Insert the menuitem to a specified position with integer numbers.</td>
</tr>
</table>
Default = <span class="syntax-keyword">auto</span>
</td>
</tr>
<tr>
<td>Separator (sep)</td>
<td>Add separator with menuitem position by parameters:
<table class="table">
<tr>
<td class="syntax-keyword">None</td>
<td>Not adding a separator with the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Before</td>
<td>Add a separator before the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">After</td>
<td>Add a separator after the menuitem.</td>
</tr>
<tr>
<td class="syntax-keyword">Both</td>
<td>Add a separator before and after the menuitem.</td>
</tr>
</table>
Default = <span class="syntax-keyword">none</span>
</td>
</tr>
<tr>
<td>Image, Icon</td>
<td>The icon that appears in a menuitem, This property can be assigned as image files, resource icons, glyph or color. With one of the following parameters
<table class="table">
<tr>
<td class="syntax-keyword">Null</td>
<td>Show menuitem without icon.</td>
</tr>
<tr>
<td class="syntax-keyword">Inherit</td>
<td>Inheriting the image from the parent.</td>
</tr>
<tr>
<td class="syntax-keyword">Glyph</td>
<td>Assign image as Glyph.</td>
</tr>
<tr>
<td class="syntax-keyword">Color</td>
<td>Assign image as color.</td>
</tr>
<tr>
<td class="syntax-keyword">Path</td>
<td>Assign image from location path or resource icon.</td>
</tr>
</table>
Default = <span class="syntax-keyword">null</span>
</td>
</tr>
<tr>
<td>Parent</td>
<td><p>Move current menu item(s) to another menu.</p>
Default = <span class="syntax-keyword">null</span></td>
</tr>
<tr>
<td>Default</td>
<td>
<p>Specifies that the menuitem is the default. A menu can contain only one default menuitem, which is displayed in bold.</p>
Default = <span class="syntax-keyword">false</span>
</td>
</tr>
</tbody>
</table>
</div>
+51
View File
@@ -0,0 +1,51 @@
@page
@{
ViewData["title"] = "Variables";
ViewData["page-support"] = "Variables";
}
<h4>Variables</h4>
<br>
<p>Variables are containers for storing data values.</p>
<ul>
<li>Global and local variables are optional.</li>
<li>To declare more than one variable, use a space.</li>
</ul>
<p>The general rules for constructing names for variables (unique identifiers) are:</p>
<ul>
<li>Names can contain letters, digits and underscores (<code>_</code>).</li>
<li>Names must begin with a letter.</li>
<li>Names cannot contain whitespaces or special characters like !, #, %, etc.</li>
<li>Reserved words (like keywords, such as null, true, false, etc.) cannot be used as names.</li>
<li>Variables can be placed in globle variables, or in the dynamic body section of an menu, or in both.</li>
</ul>
<p>
All variables must be identified with unique names.<br>
These unique names are called identifiers.
Identifiers can be short names (like x and y) or more descriptive names (age, sum, totalVolume).
</p>
<p><i>Note:</i> It is recommended to use descriptive names in order to create understandable and maintainable code</p>
<h5 class="mt-5">Example</h5>
<pre class="syntax"><code>shell
{
var
{
hello_world = <span class="syntax-string">'Hello World!'</span>
test_add1 = <span class="syntax-number">5</span> + <span class="syntax-number">6</span>
}
dynamic
{
item(title = <span class="syntax-code">@@hello_world</span> cmd = <span class="syntax-code">@@msg(hello_world)</span>)
menu(title = <span class="syntax-code">@@test_add1</span>)
{
var
{
test_sub1 = <span class="syntax-number">11</span> - <span class="syntax-number">5</span>
}
item(title = <span class="syntax-code">@@test_sub1</span>)
}
}
}</code></pre>
+165
View File
@@ -0,0 +1,165 @@
@using Nilesoft.Models
@{
Layout = "_Layout";
//ViewData["Title"] = "Documentation";
var doc_page = ViewData["doc_page"];
var path = this.Context.Request.Path.Value;
string doc_path = "/docs";
TreeListItem[] list = new TreeListItem[]
{
new TreeListItem { Title = "Introduction", Link = "" },
new TreeListItem { Title = "Installation", Link = "installation" },
new TreeListItem { Title = "Get Started", Link = "getstarted" },
new TreeListItem
{
Title = "Syntax", Link = "syntax",
Items = new TreeListItem[]
{
new TreeListItem { Title = "Variables", Link= "variables" },
new TreeListItem { Title = "Static", Link = "static" },
new TreeListItem { Title = "Dynamic", Link = "dynamic" }
}
},
new TreeListItem
{
Title = "Expressions", Link = "expressions",
Items = new TreeListItem[]
{
new TreeListItem { Title = "Comments", Link= "comments" },
new TreeListItem { Title = "String literal", Link = "string" },
new TreeListItem { Title = "Numeric literal", Link = "numeric" },
new TreeListItem { Title = "Color literal", Link = "color" },
new TreeListItem { Title = "Operators", Link = "operators" },
new TreeListItem { Title = "Identfier", Link = "identfier" }
}
},
new TreeListItem
{
Title = "Functions", Link = "functions",
Items = new TreeListItem[]
{
new TreeListItem { Title = "app", Link= "app" },
new TreeListItem { Title = "color", Link = "color" },
new TreeListItem { Title = "io", Link = "io" },
new TreeListItem { Title = "key", Link = "key" },
new TreeListItem { Title = "msg", Link = "msg" },
new TreeListItem { Title = "path", Link = "path" },
new TreeListItem { Title = "reg", Link = "reg" },
new TreeListItem { Title = "sel", Link = "sel" },
new TreeListItem { Title = "str", Link = "str" },
new TreeListItem { Title = "sys", Link = "sys" },
new TreeListItem { Title = "user", Link = "user" }
}
},
new TreeListItem
{
Title = "Examples", Link = "examples",
Items = new TreeListItem[]
{
new TreeListItem { Title = "Copy path", Link = "copypath" },
new TreeListItem { Title = "Favorites", Link = "favorites" },
new TreeListItem { Title = "Goto", Link = "goto" }
}
}
};
}
<h4 class="is-size-4 mb-5">Documentation</h4>
<div class="columns">
<aside id="categories" class="column is-one-quarter px-2">
<section class="menu">
<div class="container">
<ul class="menu-list">
@foreach (var item in list)
{
<li>
@if (item.Link != null)
{
var lnk = doc_path + "/" + item.Link;
<a href="@Html.Raw(lnk)" @if(path.Equals(lnk)) { @Html.Raw("class=\"is-active\"") ; }>
@if(item.Items?.Length > 0)
{
@if(path.StartsWith(lnk))
{
<i class="mdl2 mdl2-scroll-chevron-down-legacy"></i>
}
else
{
<i class="mdl2 mdl2-scroll-chevron-right-legacy"></i>
}
<span class="ml-2">@item.Title</span>
}
else
{
<span class="ml-5">@item.Title</span>
}
</a>
}
else
{
<span class="ml-6">@item.Title</span>
}
@if(item.Items != null && path.StartsWith(@doc_path + "/" + @item.Link))
{
<ul>
@foreach (var subitem in item.Items)
{
<li>
@{ var lnk = doc_path + "/" + item.Link + "/" + subitem.Link;}
<a href="@Html.Raw(lnk)" @if (path.Equals(lnk)) { @Html.Raw("class=\"is-active\"") ; }>@subitem.Title</a>
</li>
}
</ul>
}
</li>
}
</ul>
</ul>
</div>
</section>
<section id="ad-responsive-vertical">
<div class="container p-3 has-text-centered my-4">
<!-- ad-responsive-vertical -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-2559766466824022"
data-ad-slot="2410467654"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>
</section>
</aside>
<div id="content" class="column">
<div class="content">
@*<nav class="breadcrumb has-bullet-separator" aria-label="breadcrumbs">
<ul>
@{ var x = path.Split('/', StringSplitOptions.RemoveEmptyEntries);
for (var i = 0; i < x.Length; i++)
{
<li><a href="@string.Join("/", x, 0, i)" @if (i + 1 == x.Length)
{ @Html.Raw("class=\"is-active\"")}>@x[i]</a></li>
}
}
</ul>
</nav>*@
@RenderBody()
<section id="ad-responsive-horizontal" class="has-text-centered my-4">
<!-- ad-responsive-horizontal -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-2559766466824022"
data-ad-slot="9611969124"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</section>
</div>
</div>
</div>
+3
View File
@@ -0,0 +1,3 @@
@{
Layout = "_DocsLayout";
}