From 1254f5619359be4546d4ed24bb70acffa1f4fdda Mon Sep 17 00:00:00 2001
From: Mahmoud Gomaa This page contains some examples of what Shell can do. interprets color constants as hexadecimal if they are preceded by Comments can be used to explain Shell code, and to make it more readable. It can also be used to prevent execution Shell code. Comments can be singled-lined or multi-lined.
+ Single-line comments start with two forward slashes ( This example uses a single-line comment before a line of code: This example uses a single-line comment at the end of a line of code:
+ Multi-line comments start with
+ Single or multi-line comments? The Identifier have unique titles described by fully qualified names that indicate a logical hierarchy. There is a hierarchy of keywords in that some keywords are always followed by others. Shell provides a variety of statements and expressions. Most of these will be familiar to developers who have programmed in C, C++, C#. Expressions gives you all the power of Shell, 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. 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 Shell are a little bit hard to read. But with a good understanding of expression syntax and a little practice, it becomes much easier. There are two types of numbers. Integer and floating point. An integer is a numeric literal(associated with numbers) without any fractional or exponential part. There are two types of integer literals: 1. Decimal-literal(base 10): 2. Hexadecimal-literal(base 16): A floating-point literal is a numeric literal that has either a fractional form or an exponent form. For example: Floating-point literals specify values that must have a fractional part. These values contain decimal points (.) An operator is a symbol that tells to perform specific mathematical or logical manipulations. Shell is rich in built-in operators and provide the following types of operators This chapter will examine the arithmetic, relational, logical, bitwise, assignment and other operators one by one. The five arithmetical operations supported 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. The result of such an operation is either true or false (i.e., a Boolean value). The relational operators are: The operator The logical operators 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: If condition is true, the entire expression evaluates to result1, and otherwise to result2. Bitwise operators modify variables considering the bit patterns that represent the values they store. A single expression may have multiple operators. For example: the above expression always assigns 6 to variable x, because the From greatest to smallest priority, Operators are evaluated in the following order: 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. An operator is a symbol that tells to perform specific mathematical or logical manipulations. Shell is rich in built-in operators and provide the following types of operators This chapter will examine the arithmetic, relational, logical, bitwise, assignment and other operators one by one. The five arithmetical operations supported 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. The result of such an operation is either true or false (i.e., a Boolean value). The relational operators are: The operator The logical operators 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: If condition is true, the entire expression evaluates to result1, and otherwise to result2. Bitwise operators modify variables considering the bit patterns that represent the values they store. A single expression may have multiple operators. For example: the above expression always assigns 6 to variable x, because the From greatest to smallest priority, Operators are evaluated in the following order:
+ 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. string is zero or more characters written inside single or double quotes. You can use quotes inside a string, as long as they don't match the quotes surrounding the string: single quotes allow you to use the syntax of expressions within them. double quotes allow you to use the Escape Character inside them only. The complete set of escape sequences is as follows: The functions and variables have unique titles described by fully qualified names that indicate a logical hierarchy. Shell has a number of functions and variables built into it that are always available. They are listed here in alphabetical order. 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. If a message box has a Cancel button, the function returns the If the function fails, the return value is zero.Copy Path example
+
+
+
\ No newline at end of file
diff --git a/docs/Examples/Favorites.cshtml b/docs/Examples/Favorites.cshtml
new file mode 100644
index 0000000..af3708d
--- /dev/null
+++ b/docs/Examples/Favorites.cshtml
@@ -0,0 +1,43 @@
+@page
+@{
+ ViewData["title"] = "Favorites - Examples";
+ ViewData["page-support"] = "Examples \\ Favorites";
+ ViewData["meta-og:image"] = "/images/support/examples/fav1.png";
+}
+shell
+{
+ dynamic
+ {
+ // type can set with '~taskbar' equals all file types except taskbar.
+ menu(type='file|dir|back|root|namespace' title='copy to clipboard' image=#ff00ff)
+ {
+ // Appears only when multiple selections.
+ item(vis=@@(sel.count > 1) title='Copy path (@@sel.count) items selected'
+ cmd=@@sys.copy(sel(false, "\n")))
+
+ item(mode=single title=@@sel.path
+ cmd=@@sys.copy(sel.path))
+
+ item(mode=single type='file|dir|back.dir'
+ vis=@@sel.short.len!=sel.path.len title=@@sel.short
+ cmd=@@sys.copy(sel.short))
+ separator
+ item(mode=single vis=@@(sel.parent.len>3) title=@@sel.parent
+ cmd=@@sys.copy(sel.parent))
+ separator
+ item(mode=single type='file|dir|back.dir' title=@@sel.file.name
+ cmd=@@sys.copy(sel.file.name))
+
+ item(mode=single type='file' title=@@sel.file.title
+ cmd=@@sys.copy(sel.file.title))
+
+ item(mode=single type='file' title=@@sel.file.ext
+ cmd=@@sys.copy(sel.file.ext))
+ }
+ }
+}Favorite applications and directories example
+
+shell
+{
+ dynamic
+ {
+ menu(type='desktop|taskbar' title='Favorites' image=#00ff00)
+ {
+ menu(title='Applications' image=#ff0000)
+ {
+ item(title='Command propt' image cmd='cmd.exe')
+ item(title='PowerShell' image cmd='powershell.exe')
+ item(title='Registry editor' image cmd='regedit.exe')
+ separator
+ item(title='Paint' image cmd='mspaint.exe')
+ item(title='Notepad' image cmd='notepad.exe')
+ }
+ separator
+ menu(title='Directories' image=#0000ff)
+ {
+ item(title='Downloads' cmd=@@user.downloads)
+ item(title='Pictures' cmd=@@user.pictures)
+ item(title='Home' cmd=@@user.directory)
+ separator
+ item(title='Windows' cmd=@@sys.directory)
+ item(title='Program files' cmd=@@sys.prog)
+ }
+ }
+ }
+}
+
+
+
+
+Goto example
+
+
+shell
+{
+ dynamic
+ {
+ menu(mode=multiple title='goto' separator=bottom image=0xed25)
+ {
+ item(title='Windows' image-inherit cmd=@@sys.dir)
+ item(title='System' image-inherit cmd=@@sys.bin)
+ item(title='Program Files' image-inherit cmd=@@sys.prog)
+ item(title='Program Files x86' image-inherit cmd=@@sys.prog32)
+ item(title='ProgramData' image-inherit cmd=@@sys.programdata)
+ item(title='Applications' image-inherit cmd='shell:appsfolder')
+ item(title='Users' image-inherit cmd=@@sys.users)
+ item(title='Control Panel' image=0xe115 cmd='shell:::{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}')
+ item(title='Control Panel (All Tasks)' image=0xe115 cmd='shell:::{ED7BA470-8E54-465E-825C-99712043E01C}')
+ item(title='run' cmd='shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}')
+ separator
+ item(title=@@user.name@@@@@@sys.name vis=disable)
+ item(title='Desktop' image-inherit cmd=@@user.desktop)
+ item(title='Downloads' image-inherit cmd=@@user.downloads)
+ item(title='Pictures' image-inherit cmd=@@user.pictures)
+ item(title='Documents' image-inherit cmd=@@user.documents)
+ item(title='Startmenu' image-inherit cmd=@@user.startmenu)
+ item(title='Profile' image-inherit cmd=@@user.dir)
+ item(title='AppData' image-inherit cmd=@@user.appdata)
+ item(title='Temp' image-inherit cmd=@@user.temp)
+ menu(title='settings' separator=top image=0xe115)
+ {
+ // https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-settings-app
+ item(title='systeminfo' image=0xe946 cmd-line='/K systeminfo')
+ item(title='search' cmd='search-ms:' image=0xe721)
+ item(title='settings' image-inherit cmd='ms-settings:')
+ item(title='about' image=0xe946 cmd='ms-settings:about')
+ item(title='usb' image=0xe88e cmd='ms-settings:usb')
+ item(title='network-status' image=0xec27 cmd='ms-settings:network-status')
+ item(title='network-ethernet' image=0xe839 cmd='ms-settings:network-ethernet')
+ item(title='personalization-background' image=0xeb9f cmd='ms-settings:personalization-background')
+ item(title='personalization-colors' image=0xe790 cmd='ms-settings:colors')
+ item(title='lockscreen' image=0xee3f cmd='ms-settings:lockscreen')
+ item(title='personalization-start' image=0xeca5 cmd='ms-settings:personalization-start')
+ item(title='appsfeatures' image=0xe179 cmd='ms-settings:appsfeatures')
+ item(title='optionalfeatures' image=0xe179 cmd='ms-settings:optionalfeatures')
+ item(title='defaultapps' image=0xe17d cmd='ms-settings:defaultapps')
+ item(title='yourinfo' image=0xe136 cmd='ms-settings:yourinfo')
+ item(title='windowsupdate' image=0xe895 cmd='ms-settings:windowsupdate')
+ item(title='windowsdefender' image=0xe83d cmd='ms-settings:windowsdefender')
+ item(title='network connections' image-inherit cmd='shell:::{7007ACC7-3202-11D1-AAD2-00805FC1270E}')
+ }
+ }
+ }
+}
+
+Examples
+Taskbar example
+
\ No newline at end of file
diff --git a/docs/Expressions/Color.cshtml b/docs/Expressions/Color.cshtml
new file mode 100644
index 0000000..9ca27f3
--- /dev/null
+++ b/docs/Expressions/Color.cshtml
@@ -0,0 +1,9 @@
+@page
+@{
+ ViewData["page-support"] = "Expressions \\ Color";
+}
+
+shell
+{
+ var
+ {
+ hello_world = 'Hello World!'
+ }
+
+ dynamic
+ {
+ item(title=@@hello_world cmd=@@msgbox(@@hello_world))
+ separator
+ item(title='Command prompt' cmd='cmd.exe' args='/k echo @@hello_world')
+ separator
+ menu(title='Sub menu')
+ {
+ item(title='Open Paint' cmd='paint.exe' arg=@@sel.path)
+ separator
+ item(title='Open Notepad' cmd='notepad.exe' arg='"@@sel.path"')
+ }
+ }
+}Color literal
+
+Hexadecimal Colors
+# and hexadecimal color is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF.
For example, the #0000FF value is rendered as blue, because the blue component is set to its highest value (FF) and the others are set to 00.
There are 140 color names are predefined under the color scope.Comments
+Single-line Comments
+ //).
+ Any text between // and the end of the line is ignored by the compiler (will not be executed).
+
+
+ shell
+{
+ dynamic
+ {
+ // This is a comment
+ item(title='Hello World!')
+
+ //item(title='Hello World!')
+ }
+}
+shell
+{
+ dynamic
+ {
+ item(title='Hello World!') // This is a comment
+ }
+}
+Multi-line Comments
+ /* and ends with */.
+ Any text between /* and */ will be ignored by the compiler:
+
+ shell
+{
+ dynamic
+ {
+ item(title='Hello,/* multiple-lines comment inside */ world')
+
+ /*
+ item(title='test item 1')
+ item(title='test item 2')
+ */
+ }
+
+}
+ It is up to you which you want to use. Normally, we use // for short comments, and /* */ for longer.
+ Identifier
+
+
The Identifier that has no parameters. Parentheses are added when necessary to separate:
diff --git a/docs/Expressions/Index.cshtml b/docs/Expressions/Index.cshtml
new file mode 100644
index 0000000..1d9e459
--- /dev/null
+++ b/docs/Expressions/Index.cshtml
@@ -0,0 +1,18 @@
+@page
+@{
+ ViewData["page-support"] = "Expressions";
+}
+sel.path
sel.path().extExpressions
+
+
+
+
+@*interprets string as expressions if they are preceded by @@*@
+
diff --git a/docs/Expressions/Numeric.cshtml b/docs/Expressions/Numeric.cshtml
new file mode 100644
index 0000000..fe23283
--- /dev/null
+++ b/docs/Expressions/Numeric.cshtml
@@ -0,0 +1,55 @@
+@page
+@{
+ ViewData["page-support"] = "Expressions \\ Numeric literal";
+}
+Numeric literals
+
+Integer literals
+
+
+
A non-zero decimal digit followed by zero or more decimal digits(0, 1, 2, 3, 4, 5, 6, 7, 8, 9).
+Decimal: 0, -9, 22 etc
0x followed by one or more hexadecimal digits(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f).
+Hexadecimal: 0x7f, 0x2a, 0x521 etcFloating-point iterals
+@*
+@*
+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:*@
diff --git a/docs/Expressions/Operators - Copy.cshtml b/docs/Expressions/Operators - Copy.cshtml
new file mode 100644
index 0000000..92446df
--- /dev/null
+++ b/docs/Expressions/Operators - Copy.cshtml
@@ -0,0 +1,193 @@
+@page
+@{
+ ViewData["page-support"] = "Expressions \\ Operators";
+}
+
+-2.0
0.0000234Operators
+ Arithmetic Operators
+
+
+
+
+
+ Operator
+ Description
+
+
+ +
+ Addition
+
+
+ -
+ Subtraction
+
+
+ *
+ Multiplication
+
+
+ /
+ Division
+
+
+
+ %
+ Modulo
+
+ Relational and comparison operators
+
+
+
+
+
+ operator description
+
+
+ == Equal to
+
+
+ != Not equal to
+
+
+ < Less than
+
+
+ > Greater than
+
+
+ <= Less than or equal to
+
+
+
+ >= Greater than or equal to
+
+ Logical Operators (!, ||, &&)
+ ! 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:&& and || are used when evaluating two expressions to obtain a single relational result. The operator && 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 && evaluating the expression a && b:
+
+
+
+
+ operator
+ description
+
+
+ &&
+ Called Logical AND operator. If both the operands are non-zero, then condition becomes true.
+
+
+ ||
+ Called Logical OR Operator. If any of the two operands is non-zero, then condition becomes true.
+
+
+
+ !
+
+ 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.
+
+
+ !(5 == 5) // evaluates to false because the expression at its right (5 == 5) is true
+!(6 <= 4) // evaluates to true because (6 <= 4) would be false
+!true // evaluates to false
+!false // evaluates to true
+ Conditional ternary operator
+
+ condition ? result1 : result2
+
+ 7==5 ? 4 : 3 // evaluates to 3, since 7 is not equal to 5.
+7==5+2 ? 4 : 3 // evaluates to 4, since 7 is equal to 5+2.
+5>3 ? a : b // evaluates to the value of a, since 5 is greater than 3.
+a>b ? a : b // evaluates to whichever is greater, a or b.Bitwise Operators
+
+
+
+
+
+ Operator
+ Description
+
+
+ &
+ Bitwise AND
+
+
+ |
+ Bitwise inclusive OR
+
+
+ ^
+ Bitwise exclusive OR
+
+
+ ~
+ Unary complement (bit inversion)
+
+
+ <<
+ Shift bits left
+
+
+
+ >>
+ Shift bits right
+ Precedence of operators
+
+ x = 5 + 7 % 2% operator has a higher precedence than the + 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:
+x = 5 + (7 % 2) // x = 6 (same as without parenthesis)
+x = (5 + 7) % 2 // x = 0
+
+
+
+
+ Level
+ Precedence group
+ Operator
+ Description
+ Grouping
+
+
+ 1
+ Postfix (unary)
+
+ ++ --postfix increment / decrement
+ Left-to-right
+
+ ()functional forms
+ []subscript
+ .member access
+
+ 2 Prefix (unary) ++ --prefix increment / decrement Right-to-left
+ ~ !bitwise NOT / logical NOT
+ + -unary prefix
+ 4 Arithmetic: scaling * / %multiply, divide, modulo Left-to-right
+ 5 Arithmetic: addition + -addition, subtraction Left-to-right
+ 6 Bitwise shift << >>shift left, shift right Left-to-right
+ 7 Relational < > <= >=comparison operators Left-to-right
+ 8 Equality == !=equality / inequality Left-to-right
+ 9 And &bitwise AND Left-to-right
+ 10 Exclusive or ^bitwise XOR Left-to-right
+ 11 Inclusive or |bitwise OR Left-to-right
+ 12 Conjunction &&logical AND Left-to-right
+ 13 Disjunction ||logical OR Left-to-right
+ 15 Assignment-level expressions =assignment Right-to-left
+ ?:conditional operator
+
+16 Sequencing ,comma separator Left-to-right
+ Enclosing all sub-statements in parentheses (even those unnecessary because of their precedence) improves code readability.Operators
+
+Arithmetic Operators
+
+
+
+
+
+ Operator
+ Description
+
+
+ +
+ Addition
+
+
+ -
+ Subtraction
+
+
+ *
+ Multiplication
+
+
+ /
+ Division
+
+
+
+%
+ Modulo
+
+Relational and comparison operators
+
+
+
+
+
+ operator description
+
+
+ == Equal to
+
+
+ != Not equal to
+
+
+ < Less than
+
+
+ > Greater than
+
+
+ <= Less than or equal to
+
+
+
+>= Greater than or equal to
+
+Logical Operators (!, ||, &&)
+! 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:&& and || are used when evaluating two expressions to obtain a single relational result. The operator && 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 && evaluating the expression a && b:
+
+
+
+
+ operator
+ description
+
+
+ &&
+ Called Logical AND operator. If both the operands are non-zero, then condition becomes true.
+
+
+ ||
+ Called Logical OR Operator. If any of the two operands is non-zero, then condition becomes true.
+
+
+
+!
+
+ 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.
+
+
+ !(5 == 5) // evaluates to false because the expression at its right (5 == 5) is true
+!(6 <= 4) // evaluates to true because (6 <= 4) would be false
+!true // evaluates to false
+!false // evaluates to true
+Conditional ternary operator
+
+condition ? result1 : result2
+
+7==5 ? 4 : 3 // evaluates to 3, since 7 is not equal to 5.
+7==5+2 ? 4 : 3 // evaluates to 4, since 7 is equal to 5+2.
+5>3 ? a : b // evaluates to the value of a, since 5 is greater than 3.
+a>b ? a : b // evaluates to whichever is greater, a or b.Bitwise Operators
+
+
+
+
+
+ Operator
+ Description
+
+
+ &
+ Bitwise AND
+
+
+ |
+ Bitwise inclusive OR
+
+
+ ^
+ Bitwise exclusive OR
+
+
+ ~
+ Unary complement (bit inversion)
+
+
+ <<
+ Shift bits left
+
+
+
+>>
+ Shift bits right
+ Precedence of operators
+
+ x = 5 + 7 % 2% operator has a higher precedence than the + 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:
+x = 5 + (7 % 2) // x = 6 (same as without parenthesis)
+x = (5 + 7) % 2 // x = 0
+
+
+
+
+ Level
+ Precedence group
+ Operator
+ Description
+ Grouping
+
+
+ 1
+ Postfix (unary)
+
+ ++ --postfix increment / decrement
+ Left-to-right
+
+ ()functional forms
+ []subscript
+ .member access
+
+ 2 Prefix (unary) ++ --prefix increment / decrement Right-to-left
+ ~ !bitwise NOT / logical NOT
+ + -unary prefix
+ 4 Arithmetic: scaling * / %multiply, divide, modulo Left-to-right
+ 5 Arithmetic: addition + -addition, subtraction Left-to-right
+ 6 Bitwise shift << >>shift left, shift right Left-to-right
+ 7 Relational < > <= >=comparison operators Left-to-right
+ 8 Equality == !=equality / inequality Left-to-right
+ 9 And &bitwise AND Left-to-right
+ 10 Exclusive or ^bitwise XOR Left-to-right
+ 11 Inclusive or |bitwise OR Left-to-right
+ 12 Conjunction &&logical AND Left-to-right
+ 13 Disjunction ||logical OR Left-to-right
+ 15 Assignment-level expressions =assignment Right-to-left
+ ?:conditional operator
+
+16 Sequencing ,comma separator Left-to-right
+ Enclosing all sub-statements in parentheses (even those unnecessary because of their precedence) improves code readability.
+String literal
+
+
+var
+{
+ var1 = "It's alright"
+ var2 = "He is called 'Johnny'"
+ var3 = 'He is called "Johnny"'
+}
+Single quotes
+
+
The @@ sign must be placed before the expressions.
+dynamic
+{
+ item(title = 'windows dir path: @@sys.dir')
+}
+Double quotes
+
+
The backslash (\) escape character turns special characters into characters.
The sequence \" inserts a double quote in a string:
+var
+{
+ var1 = "hello\"world"
+ // result: hello"world
+}
+
+
+
diff --git a/docs/Functions/App.cshtml b/docs/Functions/App.cshtml
new file mode 100644
index 0000000..fa61fd9
--- /dev/null
+++ b/docs/Functions/App.cshtml
@@ -0,0 +1,20 @@
+@page
+@{
+ ViewData["page-support"] = "Functions \\ APP";
+}
+
+ \' Single quote
+ \" Double quote
+ \\ Backslash
+ \0 Null
+ \a Alert
+ \b Backspace
+ \f Form Feed
+ \n New Line
+ \r Carriage Return
+ \t Horizontal Tab
+ \v Vertical Tab
+ \uxxxx Unicode escape sequence (UTF-16) \uHHHH (range: 0000 - FFFF)
+ \xnnnn Unicode escape sequence for character with hex value nnnn (variable length version of \uxxxx)
+
+\Uxxxxxxxx Unicode escape sequence (UTF-32) \U00HHHHHH (range: 000000 - 10FFFF) APP
+
+app.about
+app.cfg
+app.directory(dir)
+app.dll
+app.exe
+app.is64
+app.name
+app.reload
+app.unload
+app.version(var)
+
\ No newline at end of file
diff --git a/docs/Functions/Color.cshtml b/docs/Functions/Color.cshtml
new file mode 100644
index 0000000..39ea86a
--- /dev/null
+++ b/docs/Functions/Color.cshtml
@@ -0,0 +1,153 @@
+@page
+@{
+ ViewData["page-support"] = "Functions \\ COLOR";
+}
+COLOR
+
+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
+
\ No newline at end of file
diff --git a/docs/Functions/IO.cshtml b/docs/Functions/IO.cshtml
new file mode 100644
index 0000000..ba8d620
--- /dev/null
+++ b/docs/Functions/IO.cshtml
@@ -0,0 +1,40 @@
+@page
+@{
+ ViewData["page-support"] = "Functions \\ IO";
+}
+IO
+
+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
+
+
+@*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:*@
\ No newline at end of file
diff --git a/docs/Functions/Image.cshtml b/docs/Functions/Image.cshtml
new file mode 100644
index 0000000..fa61fd9
--- /dev/null
+++ b/docs/Functions/Image.cshtml
@@ -0,0 +1,20 @@
+@page
+@{
+ ViewData["page-support"] = "Functions \\ APP";
+}
+APP
+
+app.about
+app.cfg
+app.directory(dir)
+app.dll
+app.exe
+app.is64
+app.name
+app.reload
+app.unload
+app.version(var)
+
\ No newline at end of file
diff --git a/docs/Functions/Index.cshtml b/docs/Functions/Index.cshtml
new file mode 100644
index 0000000..71ece41
--- /dev/null
+++ b/docs/Functions/Index.cshtml
@@ -0,0 +1,111 @@
+@page
+@{
+ ViewData["page-support"] = "Functions";
+}
+Functions
+
+if
+for
+foreach
+equal
+greater
+less
+shl
+shr
+char
+not
+print
+quote
+tohex
+null
+var
+
+
+Keyword
+
+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
+
+
+
diff --git a/docs/Functions/Key.cshtml b/docs/Functions/Key.cshtml
new file mode 100644
index 0000000..5edc73e
--- /dev/null
+++ b/docs/Functions/Key.cshtml
@@ -0,0 +1,66 @@
+@page
+@{
+ ViewData["page-support"] = "Functions \\ KEY";
+}
+KEY
+
+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
+
+
diff --git a/docs/Functions/Msg.cshtml b/docs/Functions/Msg.cshtml
new file mode 100644
index 0000000..3956d2c
--- /dev/null
+++ b/docs/Functions/Msg.cshtml
@@ -0,0 +1,119 @@
+@page
+@{
+ ViewData["page-support"] = "Functions \\ MSG";
+}
+MSG
+Syntax
+
+msg(text)
+msg(text, title)
+msg(text, title, flags)
+
+
+Parameters
+
+
+
+
+
+ text
+ The message to be displayed.
+
+
+ title
+ The dialog box title. If this parameter is NULL, the default title is Nilesoft Shell.
+
+
+flags
+ The contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups of flags.
+ Flags
+
+To display an icon in the message box, specify one of the following values.
+
+
+To indicate the buttons displayed in the message box, specify one of the following values.
+
+
+
+To indicate the default button, specify one of the following values.
+
+
+
+To indicate the modality of the dialog box, specify one of the following values.
+
+
+
+To specify other options, use one or more of the following values.
+
+
+
+Return value
+msg.idcancel value if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC will no effect - unless an msg.ok button is present. If an msg.ok button is displayed and the user presses ESC, the return value will be msg.idok.
+If the function succeeds, the return value is one of the following values:
+
+
+
msg("Hello, Warld!","NileSoft Shell", msg.info | msg.ok)
+msg("Hello, Warld!","NileSoft Shell")
+msg("Hello, Warld!")
\ No newline at end of file
diff --git a/docs/Functions/Path.cshtml b/docs/Functions/Path.cshtml
new file mode 100644
index 0000000..b959461
--- /dev/null
+++ b/docs/Functions/Path.cshtml
@@ -0,0 +1,50 @@
+@page
+@{
+ ViewData["page-support"] = "Functions \\ PATH";
+}
++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 ++ + diff --git a/docs/Functions/Reg.cshtml b/docs/Functions/Reg.cshtml new file mode 100644 index 0000000..d8c21e3 --- /dev/null +++ b/docs/Functions/Reg.cshtml @@ -0,0 +1,23 @@ +@page +@{ + ViewData["page-support"] = "Functions \\ REG"; +} +
+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 +\ No newline at end of file diff --git a/docs/Functions/Sel.cshtml b/docs/Functions/Sel.cshtml new file mode 100644 index 0000000..f5ecb8f --- /dev/null +++ b/docs/Functions/Sel.cshtml @@ -0,0 +1,288 @@ +@page +@{ + ViewData["title"] = "SEL - Functions"; + ViewData["page-support"] = "Functions \\ SEL"; +} +
Has many functions to handle selected file system objects.
+@* has the following syntax:*@ ++
false, separator=' ')Returns all selected items with double quotation mark and custom separator.
+sel
sel(true)
sel(true, "\n")
+
++
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
0)+
0)+
0)+
0)+
0)+
type.directory
+type.file
+type.namespace
+type.drive
+type.fixed
+type.usb
+type.dvd
+type.vhd
+type.removable
+type.taskbar
+type.desktop
+type.computer
+type.recyclebin
+type.remote
+type.back
+type.back.namespace
+type.back.directory
+type.back.drive
+
++
mode.none
+mode.single
+mode.multiple
+mode.multisingle
+mode.multiunique
+
+@*
++
true, sep="\n", path='@@sys.temp\shell.txt')%temp%\shell-selections.txtsel.tofile(true)
+sel.tofile(true, "\r\n")
+sel.tofile(false, "\n", 'C:\sell\selections.txt')
+
+
++sel.paths +sel.paths.count +sel.paths.title +sel.paths.quote + +sel.directories(dirs) +sel.directories.count +sel.directories.title +sel.directories.quote + +sel.files +sel.files.count +sel.files.ext +sel.files.title +sel.files.name +sel.files.quote + +sel.types +sel.types.count + +sel.shorts +sel.shorts.count + +sel.titles +sel.titles.count + +sel.names +sel.names.count + +sel.exts +sel.exts.count + +sel.drivers +sel.drivers.count + +sel.namespaces +sel.namespaces.count ++*@ +@*If the sys function is passed without an argument, then the interactive help utility starts up on the console.*@ diff --git a/docs/Functions/Str.cshtml b/docs/Functions/Str.cshtml new file mode 100644 index 0000000..c9cc1e7 --- /dev/null +++ b/docs/Functions/Str.cshtml @@ -0,0 +1,35 @@ +@page +@{ + ViewData["page-support"] = "Functions \\ STR"; +} +
+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 +\ No newline at end of file diff --git a/docs/Functions/Sys.cshtml b/docs/Functions/Sys.cshtml new file mode 100644 index 0000000..80e25e6 --- /dev/null +++ b/docs/Functions/Sys.cshtml @@ -0,0 +1,60 @@ +@page +@{ + ViewData["page-support"] = "Functions \\ SYS"; +} +
+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 ++ diff --git a/docs/Functions/User.cshtml b/docs/Functions/User.cshtml new file mode 100644 index 0000000..4180820 --- /dev/null +++ b/docs/Functions/User.cshtml @@ -0,0 +1,32 @@ +@page +@{ + ViewData["page-support"] = "Functions \\ USER"; +} +
+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 +\ No newline at end of file diff --git a/docs/GetStarted.cshtml b/docs/GetStarted.cshtml new file mode 100644 index 0000000..4341673 --- /dev/null +++ b/docs/GetStarted.cshtml @@ -0,0 +1,34 @@ +@page +@{ + ViewData["page-support"] = "Getting started"; + ViewData["meta-og:image"] = "/images/support/helloworld.png"; +} +
+ This tutorial will teach you the basics of Shell.
+ It is not necessary to have any prior experience.
+
+ To start using Shell, you need:
+ A text editor, like Notepad, to write Shell code.
+
Let's create our first menu item.
+Open configuration file (shell.shl) and Write the following code and save.
+shell
+{
+ dynamic
+ {
+ item(title='Hello, World!')
+ }
+}
+Don't worry if you don't understand the code above - we will discuss it in detail in later chapters.
+The result will look something for this when you press the right-click in an empty place on the desktop:
+
+
+Congratulations You have now added the first time a menu item to the context menu
\ No newline at end of file diff --git a/docs/Index.cshtml b/docs/Index.cshtml new file mode 100644 index 0000000..ac24734 --- /dev/null +++ b/docs/Index.cshtml @@ -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.*@ +@**@ ++ Shell 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. +
+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
+Shell 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).
+ +
+
+Download the release package and unzip its content in any location you want.
+@*Open a command prompt with administrative permissions.
*@ +Open an elevated command prompt.
+shell -[options]
+| -register (-r) | +Registering. | +
| -unregister (-u) | +Unregistering. | +
| -init (-i) | +Initialize images cache. | +
| -restart (-re) | +Restart Windows Explorer. | +
| -silent (-s) | +Prevents displaying messages.@*Silent, do not display any dialogue boxes*@ | +
| -? | +Dispay this help message. | +
shell -register -init
+shell -unregister -restart
+ Tip: Close all instances of Windows File Explorer before uninstalling to avoid needing a reboot after it has been uninstalled.
+@*Shell installer can be fully removed from your system by using the standard Windows uninstall mechanism.
+The way this is done depends on your version of Windows.
+*@ diff --git a/docs/Syntax/Dynamic.cshtml b/docs/Syntax/Dynamic.cshtml new file mode 100644 index 0000000..62dd595 --- /dev/null +++ b/docs/Syntax/Dynamic.cshtml @@ -0,0 +1,393 @@ +@page +@{ + ViewData["title"] = "Dynamic Items"; + ViewData["page-support"] = "Dynamic"; +} +This section adds new menu items to the context menu.
+Dynamic items have three types (menu, item, and separator). with properties to add new items with customization explained below in more details.
The types (menu and item) must contain the property title at least and their value cannot be null.
A separator-type item can be added without any properties.
In the following example, it shows how to write add an items to dynamic:
+shell
+{
+ dynamic
+ {
+ item(title = 'Hello, World!')
+ separtor
+ menu(title = 'sub menu' image = #0000ff)
+ {
+ item(title = 'test subitem')
+ }
+ }
+}
+| Property | +Summary | +||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Title | +Sets a value indicating the caption of the menuitem. + This property must be included with menu and item, not Applies to separator. + Default = null +Applies to menu, item. + |
+ ||||||||||||||||||||||||||||||
| Mode | +Accept item by selections behavior. Value have one of the following parameters:
+
Applies to menu, item, separator. + |
+ ||||||||||||||||||||||||||||||
| Type | +Specify the types of object files allowed for the menu item to appear. The property is assigned to one or more of these parameters and this character | is used to separate types.+ Add a character ~ before single type to exclude.
+ The property not supported syntax expressions. +
Applies to menu, item, separator. + |
+ ||||||||||||||||||||||||||||||
| Visibility (vis) | +Visibility of menuitem and can have one of the following parameters:
+
Applies to menu, item, separator. + |
+ ||||||||||||||||||||||||||||||
| Find | +
+ Accept menuitem when the specified path name or path extension is contains or equal to the current find property. Applies to menu, item, separator. + |
+ ||||||||||||||||||||||||||||||
| Separator (sep) | +Add separator with menuitem position by parameters:
+
Applies to menu, item. + |
+ ||||||||||||||||||||||||||||||
| Position (pos) | +The position at which a menuitem should be inserted into the menu. Position can have one of the following parameters: +
Applies to menu, item, separator. + |
+ ||||||||||||||||||||||||||||||
| Image, Icon | +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
+
Applies to menu, item. + |
+ ||||||||||||||||||||||||||||||
| Command (cmd) | +The command associated with the menuitem. Occurs when the menuitem is clicked or selected using a shortcut key or access key defined for the menuitem. + Default = null +Applies to item. + |
+ ||||||||||||||||||||||||||||||
| Arguments (arg, args) | +The parameter to pass to the Command property of a menuitem. + Default = null +Applies to item. + |
+ ||||||||||||||||||||||||||||||
| Window | +Controls how the window is to be shown. can be one of the following parameters:
+ Hidden, Show, Visible, Minimized, Maximized + Default = show +Applies to item. + |
+ ||||||||||||||||||||||||||||||
| Directory (dir) | +Specify the work directory to execute the command. + Default = null +Applies to item. |
+ ||||||||||||||||||||||||||||||
| admin | +Execute the command with administrative permissions. + Default = false +Applies to item. + |
+ ||||||||||||||||||||||||||||||
| Verb | +Specifies that the operation is the default for the selected file. value type string and can have one of the following parameters: +
Applies to item. + |
+ ||||||||||||||||||||||||||||||
| Wait | +
+ Waiting Until end of command. + Default = false +Applies to item. + |
+ ||||||||||||||||||||||||||||||
| Checked | +
+ Value that indicates whether the menuitem is checked. +
Applies to item. + |
+ ||||||||||||||||||||||||||||||
| Default | +
+ Specifies that the menuitem is the default. A menu can contain only one default menuitem, which is displayed in bold. + Default = false +Applies to item. + |
+
The title property must include at least the following types of (menu or item).
This chapter describes the syntax rules for configuration file.
+=) sign are optional and are ignored.( ).Tip: When there is an error, it is recorded in the log file (shell.log).
+ +@*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.
*@ + +The following rules apply to the syntax of configuration file (shell.shl):
+shell
+{
+ // global variables
+ var
+ {
+ // variables content
+ variable-name = variable-value
+ ...
+ }
+
+ // static items
+ static
+ {
+ // static items content
+ item ( property-name = property-value ... )
+ ...
+ }
+
+ // dynamic items
+ dynamic
+ {
+ // dynamic items content
+ item ( property-name = property-value ... )
+
+ separator [( property-name = property-value ... )]
+
+ menu ( property-name = property-value ... )
+ {
+ var // local variables
+ {
+ variable-name = variable-value
+ ...
+ }
+
+ item ( property-name = property-value ... )
+ ...
+ }
+ ...
+ }
+}
+
+Breaking Long Lines
For best readability, users often like to avoid lines longer than 80 characters. single quotes also allow break up a line.
shell
+{
+ dynamic
+ {
+ item(title='Command prompt'
+ cmd='cmd.exe')
+ }
+}
+@*shell
+{
+ var
+ {
+ hello_world = 'Hello World!'
+ }
+
+ static
+ {
+ // remove items
+ item(find='restore' vis=hidden)
+ item(find='give access to' vis=hidden)
+
+ // show only on extended with shift key
+ item(find='send to' vis=extended)
+ item(find='new' vis=extended)
+
+ // remove or extend multiple items by one line
+ item(find='delete|format|rename|paste' vis=extended)
+
+ // change title
+ item(find='defender' title='Scan with Defender')
+
+ // change image
+ item(find='copy' image=#dd0000)
+
+ // change image, title
+ item(find='open with' image=#dd0000 title='Open...')
+ }
+
+ dynamic
+ {
+ item(title=@@hello_world cmd=@@msg(hello_world))
+ separator
+ item(title='Command prompt' cmd='cmd.exe' args='/k echo @@hello_world')
+ separator
+ menu(title='Sub menu')
+ {
+ item(title='Open Paint' cmd='paint.exe' arg=@@sel.path)
+ separator
+ item(title='Open Notepad' cmd='notepad.exe' arg='"@@sel.path"')
+ }
+ }
+}
+
+
+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.
The items must have the property find. 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.
In the following example, it shows how to write add an items to static:
+shell
+{
+ static
+ {
+ item(find = 'copy' image = #00ff00)
+ item(find = 'paste' image = #0000ff)
+ }
+}
+| Property | +Summary | +||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Find | +Accept menuitem when the specific menuitem title is contains or equal to the current find property. Use this delimiter | to separate patterns.
+ This property must be included with another property at least. + Default = null + |
+ ||||||||||||
| Title | +
+ Change value indicating the caption of the menuitem. + Default = null + |
+ ||||||||||||
| Mode | +Accept item by selections behavior. Value have one of the following parameters:
+
|
+ ||||||||||||
| Visibility (vis) | +Visibility of menuitem and can have one of the following parameters:.
+
|
+ ||||||||||||
| Position (pos) | +The position at which a menuitem should be inserted into the menu. Position can have one of the following parameters: +
|
+ ||||||||||||
| Separator (sep) | +Add separator with menuitem position by parameters:
+
|
+ ||||||||||||
| Image, Icon | +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
+
|
+ ||||||||||||
| Parent | +Move current menu item(s) to another menu. + Default = null |
+ ||||||||||||
| Default | +
+ Specifies that the menuitem is the default. A menu can contain only one default menuitem, which is displayed in bold. + Default = false + |
+
Variables are containers for storing data values.
+The general rules for constructing names for variables (unique identifiers) are:
+_).
+ All variables must be identified with unique names.
+ These unique names are called identifiers.
+ Identifiers can be short names (like x and y) or more descriptive names (age, sum, totalVolume).
+
Note: It is recommended to use descriptive names in order to create understandable and maintainable code
+shell
+{
+ var
+ {
+ hello_world = 'Hello World!'
+ test_add1 = 5 + 6
+ }
+
+ dynamic
+ {
+ item(title = @@hello_world cmd = @@msg(hello_world))
+
+ menu(title = @@test_add1)
+ {
+ var
+ {
+ test_sub1 = 11 - 5
+ }
+
+ item(title = @@test_sub1)
+ }
+ }
+}
+
diff --git a/docs/_DocsLayout.cshtml b/docs/_DocsLayout.cshtml
new file mode 100644
index 0000000..f38cd49
--- /dev/null
+++ b/docs/_DocsLayout.cshtml
@@ -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" }
+ }
+ }
+ };
+}
+