EZCode 1.50.10

There is a newer version of this package available.
See the version list below for details.
dotnet add package EZCode --version 1.50.10                
NuGet\Install-Package EZCode -Version 1.50.10                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EZCode" Version="1.50.10" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EZCode --version 1.50.10                
#r "nuget: EZCode, 1.50.10"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EZCode as a Cake Addin
#addin nuget:?package=EZCode&version=1.50.10

// Install EZCode as a Cake Tool
#tool nuget:?package=EZCode&version=1.50.10                

EZCode

Welcome!

Welcome to EZCode! EZCode is a comprehensive programming language built off of Microsoft WinForms. EZCode strives to make it as easy as possible to build a Windows program ranging from a Visual Application to simple console programs.

Docs

The Official Docs are on the our GitHub Wiki Page. Please refer to this for any detailed instrictions.

Example

This is a simple example to create and open a window and display a textbox onto it. Then write a that has a 10 x 10 square using '#' characters. Try to follow it with the comments!

// Set dimensions of square
var x_Scale 10
var Y_Scale 10

// Character for square
var char %

// Set up elements... Window and Textbox
window main new : type:fixed3d, text:Square Example!, width:350, height:400, maximizebutton:false
textbox box x:0, y:0, width:400, height:500, readonly:true, bg:[200;200;200], -> 
    font:[Cascadia Code;15;regular], multiline:true, wrap:false

// Open window and display textbox on it
main display box
main open

// Create and set the 'txt' var to the correct dimensions
var txt
var interval 0
loop Y_Scale 
{
    interval + 1
    loop x_Scale 
    {
        txt + 'char'\_
    }
    if interval <= Y_Scale : txt + \n
}

// Display on 'txt' textbox
box text:'txt'

// Keep program running to prevent window closing
await true

// The textbox now displays:
// % % % % % % % % % % 
// % % % % % % % % % % 
// % % % % % % % % % %
// % % % % % % % % % %
// % % % % % % % % % %
// % % % % % % % % % %
// % % % % % % % % % %
// % % % % % % % % % %

You can change the X_Scale and Y_Scale variables as well as the character being used for the square shape. The textbox takes up the entire window and has a very light grey color (200, 200, 200).

Community

Contribute to the community in many ways including the EZCode Project Repository for the community. Create a pull request and I will accept as soon as I can. There is also the Discussion Board for anybody who has questions or wants to share. If you need any help, you can look over the Wiki which includes instructions and documentation.

License

EzCode is released under the MIT License.

Overview

EZCode is a multipurpose programming language built off of C# and WinForms. It has simple syntax and is designed to be user friendly. Use it no matter your programming experince. From just getting started to a seasoned developer, EZCode can help you develop your projects with a minimal amount of code. Download the Official Installer and choose from the options on what to install.

EZCode Player

This is a neccessary option for EZCode and will play any EZCode file (.ezcode or .ezproj). It will play the file no matter what type of project it is (Windows, Console, Console + Visual, or Console + Windows).

SLN Builder

This is an optional application to install and it creates a Microsoft Visual Studio Project from an EZProject file (.ezproj). Input the project and the desired output directory.

Basic Syntax

Keywords

Keyword Syntax Function
Await await miliseconds Delays the program by miliseconds
await argument Delays program until argument is true
BringTo bringto front control Brings a control to the front of the screen
bringto back control Sends cotrolto the back of the screen
Button button name Creates a button control
button name properties Creates a button control and sets its properties
Clear clear Clears the console
clear argument Clears the console if argument is true
Destroy destroy control Destroys the control completely from the program
destroy control argument Destroys the control only if the argument is true
Else else : Goes after an 'If' statement and is only executed if the 'If' is false. Only executes the line of code after the colon, whether it is on the same line or not
else : { } Goes after an 'If' statement and is only executed if the 'If' is false. Executes only the code in the brackets
Event event control_or_window eventType method Executes the method if event is triggered.
event control_or_window eventType filepath Executes the file (assuming ezcode) if event is triggered.
File file read filepath Reads the file and outputs the text as a var through using ':' or '=>' see here
file write text_or_var filepath Writes to the file and outputs successful 1 or unsuccessful *0 using ':' or '=>' see here
file validpath filepath Checks if the inputted file is a correct file path and outputs 1 as yes and 0 as no using ':' or '=>' see here
file play filepath Plays the file (assuming ezcode) and outputs the output of the program through ':' or '=>' see here
file playproj filepath Plays the file (assuming ezproj) and outputs the output of the program through ':' or '=>' see here
file create filepath Creates the file and outputs successful 1 or unsuccessful 0 using ':' or '=>' see here
file exists filepath Checks if the inputted file exists and outputs 1 as yes and 0 as no using ':' or '=>' see here
file delete filepath Deletes the file and outputs successful 1 or unsuccessful 0 using ':' or '=>' see here
Global global var ... Creates a variable and makes it global, meaning it can be accessed from any method. See 'var' for details
global controlType ... Creates a control and makes it global, meaning it can be accessed from any method See any of the controls (button, label, shape, or textbox) fot details
global list ... Creates a list and makes it global, meaning it can be accessed from any method. See 'list' for details
global group ... Creates a group and makes it global, meaning it can be accessed from any method. See 'group' for details
Group group name new : controls, ... Creates a group that can hold as many controls as needed
group name add control Adds a control to the group
group name equals index control Finds a control by its index and sets it to the inputted control
group name remove index_or_name Removes a control from the group by its index or name
group name clear Clears all controls from the group
group name destroy Destroys the group completely
group name destroyall Destroys the group and all controls in it
group name change : properties Changes all controls in the group relative to the inputted properties (Ex: controls's 'x' value is '5.' the inputted properties are '10' so the new control's properties are '15')
group name argument change : properties If the agrument is true, this changes all controls in the group to the properties, else it changes them relative to the controls properties
If if argument : Executes the line if the argument is true. Only executes the line of code after the colon, whether it is on the same line or not
if argument : { } Executes the line if the argument is true. Executes only the code in the brackets
Input input console Waits for the user to input into the console and gives that as output through ':' or '=>' see here
input key Outputs the keys pressed as (Key, Key, Key (EX: A, Up)) using ':' or '=>' see here
input key keyName Checks if the specified key is beng pressed and outputs 1 as yes and 0 as no using ':' or '=>' see here
input mouse wheel Outputs the state of the mouse wheel as (-1, 0, or 1) using ':' or '=>' see here
input mouse wheel raw Outputs the state of the mouse wheel as the raw value the computer is getting through ':' or '=>' see here
input mouse button Outputs the state of the mouse button as (Button, Button (EX: Left, Middle)) using ':' or '=>' see here
input mouse button buttonName Checks if the specified button is beng pressed and outputs 1 as yes and 0 as no using ':' or '=>' see here
input mouse position Outputs the position of the mouse as (X:pos, Y:pos (EX: X:840, Y:92)) using ':' or '=>' see here
input mouse position X_or_Y Outputs the position of the mouse axis using ':' or '=>' see here
Intersects intersects conntol_1 control_2 Checks if the specified controls are overlapping and outputs 1 as yes and 0 as no using ':' or '=>' see here
Label label name Creates a label control
label name properties Creates a label control and sets its properties
list list name new : value, value Creates a list that can hold different values
list name add value Adds a value to the list
list name equals index value Finds a value by its index and sets it to the inputted value
list name remove index_or_name Removes a value from the list by its index or name
list name clear Clears all values from the list
list name destroy Destroys the list completely
Loop loop loopTimes { } Loops through the code in the brackets the inputted amount of times
loop argument { } Loops through the code in the brackets the while the argument is true
MessageBox messagebox title text Pops up a Windows messagebox with the inputted title and text
Print print text... prints all of the text after the keyword
Shape shape name Creates a shape control
shape name properties Creates a shape control and sets its properties
Stop stop all Quits the entire program
stop file Stops the current file running
stop method Stops the current method running
Textbox textbox name Creates a textbox control
textbox name properties Creates a textbox control and sets its properties
Variable var name Creates a variable
var name value Creates a variable and gives it the specified value
var name : code_output Creates a variable and sets its output to the output the inpputted code (EZ: var x : input mouse position x)
Window window name new Creates a window
window name new : properties, ... Creates a window and sets its properties
window name change : properties, ... Changes the window's properties
window name clear Clears all controls from the window
window name open Opens the window
window name close Closes the window
window name display control Adds a control to the window
window name display group Adds all of the controls in the group to the window
window name destroy Destroys the window completely

Modifier

Modifier Use Example
// Does not execute any of the code after the double slash var result (x * 5) // The result is the 'X' variable multiplied by 5!
| Starts the next line of code var x 10 \| var y 5
\! Value is nothing ('') var empty \\!
\n Value of newline print Hello\\nWorld!
\_ Value of space (' ') file write Hello\_Y'all C:\\path.txt
~\ or ~/ Uses local path file play ~\\file.ezcode
\; Value of colon (':') if \\; = whatever :
\= Value of equal sign ('=') if \\= = whatever :
\c Value of comma (',') label name text:Hi\\c everybody!
\e Value of exclamation mark ('!') if \\! ! whatever :
\$ Value of pipe ('|') print Agency \\\| Thing
\& Value of semicolon (';') shape name bg:[name\\;red;50;50]
\( and )\ Solves equation inside of the backslashed parenthesis print Value = \\(10 + 10)\\ // outputs 'Value = 20'
\- Returns a value with the '\-' taking out the character before it var val h3 \| val = 'val'-//
\" Value of single quote (''') var val hello \| print \\"'hello'\\"
'variable' writes out the value of the variable var val Hello \| print 'val' World!
(equation) If this is in a place where a number needs to be, it will solve the equation and set the value to it shape name x:(10 + 5)
?(argument)? If this is in a place where a boolean needs to be, it will solve the equation and set the value to it loop ?(0 > 5)? : { }
Works only after some keywords, but creates a variable from the output of the line input console => consoleOutput
: Similar to '=>', but instead of creating a variable, it sets a variable to the output of the line var consoleOutput \| input console : consoleOutput

System and References

Reference Use Example
system:time gets the current time. Has many formats so see the Wiki for that. print Time: system:time
system:random gets a random number from the inputted minumin and maximum print Random Number between 1 and 10: system:random:1:10
system:isnumber returns 0 or 1 depending on if the value is a number or not input console => number \| var number? system:isnumber:number
system:machine gets infornation about the machine. Has many subreferences so see the Wiki for that. print User Name: system:machine:username
system:currentfile returns the current file being played... if known. print Current file: system:currentfile // only really for debugging
system:currentplaydirectory gets where the executable application that is running the EZCode file is. print Executable Directory: system:currentplaydirectory
system:space returns a space. use \_ instead.
system:newline returns a newline. use \n instead.
system:nothing returns a space. use \! instead.
system:pipe returns a space. use \$ instead.
controlName:propertyName returns the property value of the control shape player \| print X = player:x
windowName:propertyName returns the property value of the window window main new \| print Title = main:text
var_or_list_or_group:length if var, returns the length of the value (ie. 'hello' has length of 5). If list or group, returns how many values are in the list or group. var name John \| print Number of Name's letters: name:length \| // or with list \| list names new : John, Sally \| print Number of names in list: names:length \|
var_or_list_or_group:index If var, returns the letter that the index corrosponds to (remember index starts from 0). If list, returns the value of the list that corrosponds with the index. If group, it will return the control's name. var a abc \| print a:1 // displays 1 \| list b new : ab, cd \| print b:0 // prints ab \| group c new : label1, shape2, shape3 \| print c:2 // returns shape3
var_or_list:contains returns 0 or 1 if the var's value contains the the inputted value or if a list's value is equal to the inputted value var v abcdef \| var contains? v:contains:g // returns 0 \| //Or for list \| list v new : abc, def, ghi \| var contains? v:contains:ghi // returns 1
value:index_or_length If there is a value seperated by commas (a,b,c,d), a colon can be put after that and either an index (number), or 'length' and it will return an output print 10,20,30:length // outputs 3 \| print 10,20,30:2 // outputs 30 (0 would be 10, 1 would be 20 in this example)
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0 107 6/2/2024
2.5.0 142 2/9/2024
2.4.4 111 1/28/2024
2.4.1 109 1/21/2024
2.3.5 124 1/16/2024
2.3.1 117 1/14/2024
2.2.0 109 1/6/2024
2.1.10 111 1/6/2024
2.1.8 115 12/31/2023
2.1.2 102 12/28/2023
2.0.1 150 12/23/2023
1.50.10 210 10/21/2023

Version 2.0.0