Thumbnail

Javascript

How To Add This Control To Your Project

  1. Make sure you have the latest version of EZ-Builder installed.
  2. Select the Install button below to download the archive file.
  3. Double click the downloaded archive file to execute installer.
  4. The installer will add this control to EZ-Builder.
  5. Load EZ-Builder and press the Project -> Add Control button from the menu.
  6. Choose the Scripting category tab.
  7. Press the Javascript icon to add the control to your project.

This plugin is a script control which accepts JavaScript as the language. There are plans to continue adding features to this plugin, and eventually integrating the JavaScript language directly into EZ-Builder in the future.

*Note: Remember, JavaScript commands are case sensitive. This applies to variables and functions.

Commands
There's a whole bunch of commands, and new ones implemented in future updates of this plugin. The code edit screen displays a manual of commands listed.
User-inserted image


You can even create functions for reusable code...
User-inserted image


Because EZ-Builder is built on the Microsoft .NET framework, you can access any .Net namespaces.
User-inserted image


Variables from the EZ-Script engine can be accessed and updated.
User-inserted image


Right-Click in the editor to view ControlCommand() syntax from all other controls in EZ-Builder.
User-inserted image

Here's code to call .Net from javascript to write a file to the desktop

Code:


// FolderPath 0 is Desktop. See...
// https://docs.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?view=netframework-4.8

var theFilePath = System.IO.Path.Combine(System.Environment.GetFolderPath(0), "custom_file.txt");

var AFile = new System.IO.StreamWriter(theFilePath);

AFile.WriteLine("First Line of file in the desktop");
AFile.WriteLine("Second Line of file in the desktop");

AFile.Close();