Actions
ezEdge actions
Browser Object
ezEdgeAvailable: will check if the Microsoft Edge WebView2 runtime is installed on the target system. The file "WebView2Loader.dll" must also be included in your project(s) along side your executable file. Use this action to check before creating the ezEdge browser object. WebView2 must be installed in the target system, If it's not there are a few ways you can easily install it during your project startup or setup . Visit the Microsoft WebView2 page to learn more about those options.
ezEdgeAvailable "[Var]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select a variable to contain available value True or False. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeCreate: Attach a ezEdge browser control to an existing rectangle object. Enter a subroutine name, the subroutine will run when initialization is complete. The data folder is for the cache and must have write access. You can use the same user data folder for multiple apps as long as the optional ezEdgeSetBrowserArgs are the same.
ezEdgeCreate "Object" "DataFolder" "Subroutine" "URL" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select a rectangle object to host the ezEdge browser object. |
|
| Data folder path. Example: |
|
| Select a subroutine name to run after initialization |
|
| Normally this is blank. Enter a URL if your not using the browser events. This can be used to create a quick simple browser object. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeDelete: Removes a ezEdge browser control previously attached to a Rectangle object.
ezEdgeDelete "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
Options
ezEdgeOptions: Use this command after browser initialization to enable or disable various browser options
ezEdgeOptions "Object" "Options" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Options separated by the "|" character |
|
| Did this function succeed, contains value of True or False. |
When clicking the ezEdgeOptions action, the menu below will appear where you can disable or enable the browser actions, all are enabled by default. So this command is pretty much used to disable any available options.
ContextMenusEnabled
Context menu (right-click menu) is enabled by default in the Microsoft Edge browser, allowing you to access various options by right-clicking on a webpage element; you don't need to enable it separately.
Key points about the Edge context menu:
Accessing it: Right-click anywhere on a webpage to open the context menu.
Functions: You can use the context menu to perform actions like copying text, pasting, opening links in new tabs, inspecting elements with developer tools, and more.
DevToolsEnabled
To enable DevTools in the Microsoft Edge browser, DevTools are enabled by default in Edge.
Key points about Edge DevTools:
Access method: Right-click on a page and select "Inspect" or use the keyboard shortcut.
Default state: DevTools are already enabled in Microsoft Edge.
ScriptsEnabled
Scripts are enabled by default; meaning JavaScript functionality is active within the embedded web content, allowing for interactive web elements within native applications that utilize WebView2.
StatusBarEnabled
The status bar in a web browser is usually invisible or blank when viewing a page, but hover over a link or click and you may see it.
ScriptDialogs
A "script dialogue" in the Edge browser typically refers to, like asking for permission to access certain features or data on your computer, usually triggered by settings related to "Cookies and site permissions" within Edge's settings.
WebMessageEnabled
Refers to, essentially enabling two-way messaging between the native app and the webpage within it; when set to "true", this communication is enabled, and when set to "false", it is disabled. Using the postMessage and ezEdgeRunAction functions requires this enabled to work.
ZoomControlEnabled
Refers to a property within the CoreWebView2Settings object that controls whether users can zoom in and out of webpages using keyboard shortcuts like Ctrl+ and Ctrl- or the mouse wheel;
Activity Actions
ezEdgeGoTo: Display a web page in a previously initialized ezEdge browser control
ezEdgeGoTo "Object" "URL" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Enter a valid URL to visit |
|
| Did this function succeed, contains value of True or False. |
ezEdgeBack: Navigates to the previous item in a ezEdge browser object''s history list
ezEdgeBack "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeForward: Navigates to the next item in a ezEdge browser object''s history list
ezEdgeForward "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeStop: Cancel a ezEdge browser object''s pending navigation or download
ezEdgeStop "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeRefresh: Refresh/Reload the current ezEdge browser object web page
ezEdgeRefresh "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeRefreshNoCache: Refresh/Reload & Clear Cache for the current web page
ezEdgeRefreshNoCache "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeLoadFromStr: You can load arbitrary HTML into the ezEdge object, call the ezEdgeLoadFromStr method passing the HTML as a string
ezEdgeLoadFromStr "Object" "HTML" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Enter a simple HTML string or use a [Var} of existing HTML |
|
| Did this function succeed, contains value of True or False. |
ezEdgeCanGoBack: Used to determine whether the web browser object has history and can navigate back
ezEdgeCanGoBack "Object" "[CanGoBack]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Select a variable to contain CanGoBack result True or False. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeCanGoForward: Used to determine whether the current web browser object has gone back in history and can now navigate forward
ezEdgeCanGoForward "Object" "[CanGoForward]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Select a variable to contain CanGoForward result True or False. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeGetPageTitle: Get the title for the current ezEdge web page document
ezEdgeGetPageTitle "Object" "[Title]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Variable to contain the page Title |
|
| Did this function succeed, contains value of True or False. |
ezEdgeCurrentURL: Get the ezEdge browser current location URL
ezEdgeCurrentURL "Object" "[URL]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Variable to contain the page URL |
|
| Did this function succeed, contains value of True or False. |
Event Actions
ezEdgeNavStart: When the Navigation of the ezEdge browser starts, capture navigations requests URL requests before navigating. This will fire for redirects as well. Here you can accomplish many tasks, such as restricting navigation by domain, https only, etc.
ezEdgeNavStart "Object" "[URL]" "Subroutine" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Variable to contain the URL |
|
| Select a subroutine to run when this event fires |
|
| Did this function succeed, contains value of True or False. |
ezEdgeNavComplete: When the Navigation of browser is complete, use a subroutine variable for event functions and Title variable to capture document title changes. Fires when the WebView has completely loaded or loading stopped
ezEdgeNavComplete "Object" "[Title]" "Subroutine" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Variable to contain the page Title |
|
| Select a subroutine to run when this event fires |
|
| Did this function succeed, contains value of True or False. |
ezEdgeTitleChanged: Event runs when the web page title changes, useful for capturing the title of the current document
ezEdgeTitleChanged "Object" "[Title]" "Subroutine" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Variable to contain the page Title |
|
| Select a subroutine to run when this event fires |
|
| Did this function succeed, contains value of True or False. |
ezEdgeSourceChanged: Event runs when the current URL source changes
ezEdgeSourceChanged "Object" "[URL]" "Subroutine" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Variable to contain the URL |
|
| Select a subroutine to run when this event fires |
|
| Did this function succeed, contains value of True or False. |
ezEdgeNewWindow: When content inside the WebView requested to open a new window
ezEdgeNewWindow "Object" "[Handled]" "Subroutine" "[URL]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Variable to contain whether popup is handled. True or False |
|
| Select a subroutine to run when this event fires |
|
| Variable to contain the popup URL requested. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeMessageReceived: Event runs when the browser object recieves a web message. Use the configured subroutine to process messages between your project and the browser. This is a powerful feature to master
ezEdgeMessageReceived "Object" "[Message]" "Subroutine" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Variable to contain the Message received from the web browser |
|
| Select a subroutine to run when this event fires |
|
| Did this function succeed, contains value of True or False. |
Utility Actions
ezEdgeWebCapture: Capture the ezEdge browser area or full page to image with optional markup
ezEdgeWebCapture "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
( v1.06 > )
ezEdgeGetImageDimensions: Get image dimensions, parameter must be the path to an image on your local hard drive. Two VisualNeo variables named imgWidth and imgHeight will be created with dimensions. Handy for viewing .webp, .gif, .jpg, etc in an ezEdge Window.
ezEdgeGetImageDimensions "[FileName]"
Parameter | Type | Description |
---|---|---|
|
| Path to image file on your local hard drive. |
ezEdgeWebCaptureToFile: Capture the visible ezEdge browser area to PNG image and save to disk
ezEdgeWebCaptureToFile "Object" "[FileName]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Filename/Path of file, .png extension. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeBrowserVersion: Get the Edge browser version information
ezEdgeBrowserVersion "Object" "[Version]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Variable to contain the browser version information |
|
| Did this function succeed, contains value of True or False. |
ezEdgeSetBrowserArgs: Set optional ezEdge arguments, these are dependent on Microsoft Edge and Google Chrome availability. Action must be used before creating the ezEdge browser object with ezEdgeCreate.
A list of browser arguments are available here: Browser Arguments
ezEdgeSetBrowserArgs "Arguments" "[Result]"
Example:
ezEdgeSetBrowserArgs "--user-agent=[#34]Mozilla 5.0/ezEdge WIN 1.0[#34]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Enter browser arguments. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeGetBrowserArgs: Get the current ezEdge arguments previously set using the action ezEdgeSetBrowserArgs. If argument is empty or an argument is missing then it was not valid and was ignored
ezEdgeGetBrowserArgs "[Arguments]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Variable to contain the browser arguments currently set |
|
| Did this function succeed, contains value of True or False. |
ezEdgePrint: Print the current ezEdge browser web page
ezEdgePrint "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeDeleteCache: (v1.01>) Get the current ezEdge browser instance and delete the cache, then reload.
ezEdgeDeleteCache "Object" "Path" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Path to data folder used during initialization |
|
| Did this function succeed, contains value of True or False. |
ezEdgeEnableLogging: (v1.01>) Enable detailed logging, action must be used before any other commands, logging will slow down processing a little so only use for debugging troubleshooting. Enter a Path and FileName for log. (ex. [PubDir]ezEdgeLog.txt)
ezEdgeEnableLogging "Path" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Path and FileName |
|
| Did this function succeed, contains value of True or Error. |
Html Tools
ezEdgeOpenDevTools: Use this command to open the web page developer tools
ezEdgeOpenDevTools "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeExecScript: Inject and execute JavaScript code in a previously initialized ezEdge browser object. If your script returns a result, the value should be contained in the [jsResult] variable.
ezEdgeExecScript "Object" "JavaScript" "[jsResult]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Enter JavaScript code or use a [Var} of existing JavaScript |
|
| Return result of a JavaScript function. Your function must return a result for this to have a value. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeSetElement: Set a value for an document element
ezEdgeSetElement "Object" "Element" "Attribute" "New value" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Html element name to search for, start the name with a * to use query, # for using ID or just enter a name to search by name. |
|
| Attribute value to replace |
|
| New value |
|
| Did this function succeed, contains value of True or False. |
ezEdgeGetElement: Get the value for a document element
ezEdgeGetElement "Object" "Element" "Attribute" "[Value]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Html element name to search for, start the name with a * to use query, # for using ID or just enter a name to search by name. |
|
| Attribute value to Get |
|
| Variable to store the value |
|
| Did this function succeed, contains value of True or False. |
ezEdgeClickElement: Simulates a Mouse Click on the first specified document element
ezEdgeClickElement "Object" "Selector" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Selector/Element within the document to click on, start the selector name with a * to use querySelector, # for using GetElementByID or just enter a name to search by name. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeGetSource: Get source code for a specific ezEdge browser object web page to given variable
ezEdgeGetSource "Object" "[Source]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Variable to contain the browser source code |
|
| Did this function succeed, contains value of True or False. |
ezEdgeViewSource: Load source code into a viewer for a specific ezEdge browser object web page
ezEdgeViewSource "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeViewAsText: Get the current web page as Text
ezEdgeViewAsText "Object" "[Text]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Variable to store text |
|
| Did this function succeed, contains value of True or False. |
ezEdgeMarkText: Find and mark text with the current web page
ezEdgeMarkText "Object" "[Text]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Enter text to find and mark |
|
| Did this function succeed, contains value of True or False. |
ezEdgePostMessage: Send a message to the specific ezEdge browser object, used to communicate to the browser page of your VisualNeoWin project. See TwoWayCommunication demo for example.
ezEdgePostMessage "Object" "Message" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Message to send |
|
| Did this function succeed, contains value of True or False. |
Zoom Actions
ezEdgeZoomIn: Zoom In the current ezEdge browser web page
ezEdgeZoomIn "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeZoomOut: Zoom Out the current ezEdge browser web page
ezEdgeZoomOut "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeZoomReset: Reset Zoom level for the current ezEdge browser web page
ezEdgeZoomReset "Object" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| Did this function succeed, contains value of True or False. |
VisualNeo Web Actions
(are used when interacting with a VisualNeo Web app.)
ezEdgeSetWebVar: This action assigns a string value to a VisualNEO Web variable.
ezEdgeSetWebVar "Object" "Web Variable" "Value" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| VisualNeo Web variable name with no brackets []. CaSe Sensitive. |
|
| String value to assign to web variable |
|
| Did this function succeed, contains value of True or False. |
ezEdgeGetWebVar: This action returns a VisualNEO Web variable value.
ezEdgeGetWebVar "Object" "Web Variable" "[Value Result]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| VisualNeo Web variable name with no brackets [] CaSe Sensitive. |
|
| String value returned from Visual Neo Web variable. |
|
| Did this function succeed, contains value of True or False. |
ezEdgeRunWebAction: Call your own VisualNeo Web subroutines, VisualNeo Web actions and even simulate your button click events.
ezEdgeRunWebAction "Object" "Action" "Parameters" "[Value Result]" "[Result]"
Parameter | Type | Description |
---|---|---|
|
| Select an existing ezEdge browser rectangle object. |
|
| VisualNeo Web action or subroutine name. CaSe Sensitive. |
|
| If action requires parameters, surround each with a single quote and separate them with a comma. Leave blank if no parameters are required. |
|
| String value returned from VisualNeo Web action or subroutine if available. |
|
| Did this function succeed, contains value of True or False. |
JavaScript Commands (from the web browser HTML code)
ezEdgeRunAction: This JavaScript function will communicate with VisualNEOWin from your web pages, surround with single quotes..
Communicate or run VisualNeoWin actions from your HTML pages. You will need to write code in your ezEdgeMessageReceived subroutine and trap your commands to process the actions and only allow/filter your chosen commands . You could literally make up any command/fake you like, it doesn't even need to be a valid VisualNeoWin action, then in your ezEdgeMessageReceived subroutine you trap your fake command and do anything you like!
See the TwoWayCommunication sample project.
*(NOTE) NeoBook users will need to install the free hpwPlayAction plugin to use this action, otherwise NeoBook users should use the window.chrome.webview.postMessage command documented next.
ezEdgeRunAction 'Action "Parameters"'
// example
// Add this code to the action code of a button
ezEdgeExecScript "Rectangle1" "showAlertBox('Alert Message','Hello world!');" "[jsResult]" "[Result]"
// Add this code to the HTML page
<script type="text/javascript">
function showAlertBox(title, message) {
ezEdgeRunAction('AlertBox "'+title+'" "'+message+'"');
}
</script
Parameter | Type | Description |
---|---|---|
|
| VisualNEOWin action. |
|
| Parameters required by VisualNEOWin for the specific action. |
window.chrome.webview.postMessage: This JavaScript function will communicate with NeoBook from your web page, surround with single quotes..
Communicate or run NeoBook actions from your web pages. Useful for NeoBook users that cannot use the ezEdgeRunAction command. You will need to write code in your ezEdgeMessageReceived subroutine and trap your commands to process the actions. You could literally make up any NeoBook action command you like, it doesn't have to be a valid action, then in the your ezEdgeMessageReceived subroutine you trap your command and do anything you like!
See the TwoWayCommunication sample project.
// Add this code to the action code of a button
ezEdgeExecScript "Rectangle1" "showAlertBox('Alert Message','Hello world!');" "[jsResult]" "[Result]"
// Add this code to the HTML page
<script type="text/javascript">
function showAlertBox(title, message) {
window.chrome.webview.postMessage('AlertBox "'+title+'" "'+message+'"');
}
</script
Parameter | Type | Description |
---|---|---|
|
| VisualNEOWin action. |
|
| Parameters required by VisualNEOWin for the specific action. |