ezNeoEdge plugin - Forum

Forum Navigation
You need to log in to create posts and topics.

ezNeoEdge plugin

@darbdenral

I am using the ezNeoEdge plugin in a VisualNEO Web pub.

I want to run a "GoSub" action from within VisualNEO Win with the ezEdge registered plugin installed.

But the list of Actions in the listbox from the ezNeoEdge web plugin is exactly the same as the actions for  NeoEdge: _Exec, _Run, _SetVar, etc. And they don't work at all with ezNeoEdge.

How come they are the same? Is that a mistake?

How do I get the web plugin to run a "GoSub" action from within the win app?

 

thanks

.

 

 

Uploaded files:
  • You need to login to have access to uploads.

I need a simplified modification of this script without many vars: Using a button object in VisualNEO Web I want it to simply execute a "GoSub" action in NEO Win. Any examples?

<script language="JavaScript">
// Sends data to VisualNeoWin subroutine OnWebMessage
function SetVars() {
ezEdgeRunAction('SetVar "FirstName" "'+ document.getElementById('first').value +'"');
ezEdgeRunAction('SetVar "LastName" "'+ document.getElementById('last').value +'"');
 }

// The following eventListener will be triggered after running ezEdgePostMessage
// This makes a complete loop from this Page > VisualNeoWin (OnWebMessage Sub) > and back to this event
//
window.chrome.webview.addEventListener('message', arg => 
  {
    alert("Message received: " + arg.data);
  });

function GetVars() {
ezEdgeRunAction('GetVar FirstName first');
ezEdgeRunAction('GetVar LastName last');

}
// This is just a javascript function that doen't use the ezEdgePostMessage function
    function ezEdgeRunJS(message) {
      alert('JS Function Message: ' + message);
    } 
</script

Basically I want something simple like this. But it's not working ...

<script type="text/javascript">
    function showAlertBox(title, message) {
  	ezEdgeRunAction('AlertBox "'+title+'" "'+message+'"');
 }	
</script>

.

 

 

This works in NEO Web test mode, but not the compiled version

BeginJS
ezEdgeRunAction('Alertbox "Hi" "Hello"');
EndJS

What do I need to put in my NEO Win pub to recognize the web ezEdgeRunAction?

thanks

.

 

 

 

Which of the methods below are best to use?

Can they be mixed or are there rules for usage?

 

Uploaded files:
  • You need to login to have access to uploads.
Quote from fkapnist on August 21, 2024, 8:35 pm

 I want to run a "GoSub" action from within VisualNEO Win with the ezEdge registered plugin installed.

This should work fine..

BeginJS
ezEdgeRunAction('GoSub "mysubroutine"');
EndJS

 

How come they are the same? Is that a mistake?

So we can use the same code for each, allowing us to switch back and forth for testing..  Disable the neoEdge plugin as the readme file states.

Quote from fkapnist on August 21, 2024, 9:55 pm

I need a simplified modification of this script without many vars: Using a button object in VisualNEO Web I want it to simply execute a "GoSub" action in NEO Win. Any examples?

I assumed you were using your own VisualNeoWin app..  Remember the ezNeoEdge executable is no different than NeoEdge, it just uses the ezEdge browser and doesn't have much functionality besides displaying a web page or small web app..  You can do much more that that using your own VisulNeoWin App.  I assumed that's what you're doing..  And if you use the ezNeoEdge web plugin, you can access the other commands you were talking about too.

The sample above should do what you need in your own app, no ezNeoEdge.  Just add it to a button event in VisualNeoWeb and make sure the subroutine in your VisualNeoWin project exists and you're using ezEdge in that VisualNeoWin project..

Your VisualNeoWin subroutine should trap the commands in the OnWebMessage event.

Download the Sample I just created:
Sample App
It includes a simple VisualNeoWeb app and a VisualNeoWin app.  The web app runs the GoSub routine in the VisualNeoWin app running the ezEdge browser plugin.

fkapnist has reacted to this post.
fkapnist
Quote from fkapnist on August 22, 2024, 2:54 pm

Which of the methods below are best to use?

Can they be mixed or are there rules for usage?

 

You can mix them up as you wish ..  whatever works fastest for you

Quote from fkapnist on August 22, 2024, 2:12 am

This works in NEO Web test mode, but not the compiled version

Download the example in the post above for an example. ;)

@darbdenral

RE: Disable the neoEdge plugin as the readme file states.

I disabled it.  but it's icon still appears at the top bar of NEO Web and it will run the app as an available browser.

........

In Properties> Platform Option, should neoEdge and NWjs compatibility be checked?

.........

The page below won't display and the error message says: "Action references a subroutine that does not exist."

ezEdgeCreate "Rectangle1" "c:/myApp" "" "c:/myApp/test-Web/index.html#!/NewPage" "[Result]"

Is there a simple example of a button in NEO Web to run an action in NEO Win?

thanks

.

(Your given example is HTML, not a NEO Web button)

.

 

 

@darbdenral

I changed index.html#!/NewPage to just index.html

and the web page now displays ok

when I click an image in the page it should run my subroutine in NEO Win but it does nothing

BeginJS
ezEdgeRunAction('GoSub "mysubroutine"');
EndJS

 

@darbdenral

I just downloaded your new example (RunWinFromWeb) and the exe file works. But when I compile the pub files and run the exe, I get always get an error message that WebView2Loader.dll is missing, although it is in the app folder and in the www folder too. Any advice?

 

Thanks

 

I was compiling to the wrong folder.

Everything works now. Thank you very much!

.

@darbdenral

I pasted the web button into my app and unfortunately it doesn't work. So I have to take my app apart and see what code is conflicting. Another thing I noticed about the Edge browser is that Refresh (F5) doesn't always update if you modify your app. You'll have to Delete History. Which logs you out of everything online, and temporary codes are sent to your smartphone to regain access, etc. If you do this 200 times a day you'd rather go fishing. Great work Microsoft (satire)!

@darbdenral

I adjusted a checkbox plugin and now everything works just fine.

Thanks again.

Darbdenral has reacted to this post.
Darbdenral
Quote from fkapnist on August 23, 2024, 2:27 pm

Another thing I noticed about the Edge browser is that Refresh (F5) doesn't always update if you modify your app.

The shift key is your friend, try holding the shift key down and refresh at the same time in all the browsers for a hard refresh.

When you hold down the Shift key and then refresh the page (e.g., by pressing Shift + F5, Ctrl + Shift + R, or Shift + click on the refresh button), it forces the browser to bypass the cache.

 

fkapnist has reacted to this post.
fkapnist

Just to clarify a couple items..

Quote from fkapnist on August 23, 2024, 11:07 am

@darbdenral

RE: Disable the neoEdge plugin as the readme file states.

I disabled it.  but it's icon still appears at the top bar of NEO Web and it will run the app as an available browser.

That's correct, because it's registered as a webbrowser on Windows. You don't need to worry about that because it's the plugin for NeoEdge that needs to be disabled when using the plugin commands and the ezNeoEdge  browser.

In Properties> Platform Option, should neoEdge and NWjs compatibility be checked?

No, don't use that..

The other items mention it sounds like you figured out now, happy coding!

fkapnist has reacted to this post.
fkapnist
Open chat
1
Do you need more info?
Hi, do you have any doubt?