MSnet working with the GUI, but not with a form action
Moderators: Dorian (MJT support), JRL
MSnet working with the GUI, but not with a form action
Hello,
I've been playing around with MSnet and have been able to get it to work with the MSnet GUI whether between two computers on a local network, or from one computer to a server/virtual machine. However I can't seem to get the html form submit to launch a Macro Scheduler macro whether it be local or to a virtual machine.
My code is pretty much a copy/paste from the help page from MSnet.
ipaddress is an actual ipaddress, just didn't want to show it here.
<form action="http://ipaddress:6666/Name_Pro.scp" method="GET">
id: <input type="text" name="id">
<input type="submit">
</form>
The appropriate port 6666 is open and again works with MSnet GUI, just can't get it to work with my submit button. Any help would be appreciated!
-Enrico
I've been playing around with MSnet and have been able to get it to work with the MSnet GUI whether between two computers on a local network, or from one computer to a server/virtual machine. However I can't seem to get the html form submit to launch a Macro Scheduler macro whether it be local or to a virtual machine.
My code is pretty much a copy/paste from the help page from MSnet.
ipaddress is an actual ipaddress, just didn't want to show it here.
<form action="http://ipaddress:6666/Name_Pro.scp" method="GET">
id: <input type="text" name="id">
<input type="submit">
</form>
The appropriate port 6666 is open and again works with MSnet GUI, just can't get it to work with my submit button. Any help would be appreciated!
-Enrico
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: MSnet working with the GUI, but not with a form action
Does msNet require a password?
What happens if you try the URL manually in a web browser:
http://ipaddress:6666/Name_Pro.scp?id=hello
The msnet gui client is just an http client. So constructing the URL in a browser does the same thing which of course is what a form GET does. So if one works but another doesn't the issue must be forming the URL/parms wrong.
What happens if you try the URL manually in a web browser:
http://ipaddress:6666/Name_Pro.scp?id=hello
The msnet gui client is just an http client. So constructing the URL in a browser does the same thing which of course is what a form GET does. So if one works but another doesn't the issue must be forming the URL/parms wrong.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: MSnet working with the GUI, but not with a form action
Well when I try to enter into it the browser I just receive a "This webpage is not available" page. I think I am doing everything correctly except maybe the ip. Lets say I were to use an ipaddress: 192.168.1.2, a port 6666, and wanted to use the macro Name_Pro.scp and send the parameter id = 121.
I should be able to enter it like this, correct?
http://192.168.1.2:6666/Name_Pro.scp?id=121
Entering this just shows a "This webpage is not available" page.
Thanks Marcus.
I should be able to enter it like this, correct?
http://192.168.1.2:6666/Name_Pro.scp?id=121
Entering this just shows a "This webpage is not available" page.
Thanks Marcus.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: MSnet working with the GUI, but not with a form action
What are you entering into the gui? If you show me a screenshot I can show you the equivalent to enter into a browser, which would be the same as for a form post.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: MSnet working with the GUI, but not with a form action
Here is the screenshot of the gui. Thanks Marcus!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: MSnet working with the GUI, but not with a form action
In your GUI you are specifying a macro name but in your form you have a filename. You can do either but a filename would need a path. Given that you are specifying just a macro name (as known to Macro Scheduler) then I think you want:
http://105.131.125.171:6666/Name_Pro?id=121
Or if the form and macro on the same machine use localhost, or try 127.0.0.1:
http://127.0.0.1:6666/Name_Pro?id=121
http://105.131.125.171:6666/Name_Pro?id=121
Or if the form and macro on the same machine use localhost, or try 127.0.0.1:
http://127.0.0.1:6666/Name_Pro?id=121
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: MSnet working with the GUI, but not with a form action
Okay I found out what the issue was (sort of). Apparently both the form action and entering the request through the browser doesn't work with Chrome, but with Internet Explorer and Firefox. I'm not sure if there is a setting I need to fix in Chrome to get this to work (do you know what could be causing this?), but by default it doesn't work.
Anyway, Thanks for your help Marcus! If you can provide any more insight on the chrome issue that would be great.
Anyway, Thanks for your help Marcus! If you can provide any more insight on the chrome issue that would be great.
Re: MSnet working with the GUI, but not with a form action
Pursuing this further and reading in the Chrome console, I get the error message: net::ERR_UNSAFE_PORT. Looking this up online I have read the Chrome happens to consider port 6666 (the default recommended port from you guys) as unsafe. Just a heads up for ya Marcus for further documentation and what not.
Edit:
I'm actually having trouble getting any other port to work other than 6666 (when using IE or Firefox). It's important that we have msNet work for Chrome, do you have any other recommendations for ports that msNet uses?
Thanks
- Enrico Valbuena
Edit:
I'm actually having trouble getting any other port to work other than 6666 (when using IE or Firefox). It's important that we have msNet work for Chrome, do you have any other recommendations for ports that msNet uses?
Thanks
- Enrico Valbuena
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: MSnet working with the GUI, but not with a form action
It all depends on your firewall. Use any port number you like but a) make sure your firewall has it open and b) don't use one that something else might be using (therefore worth avoiding the commonly used ones).
http://stackoverflow.com/questions/3363 ... afe-to-use
http://stackoverflow.com/questions/3363 ... afe-to-use
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: MSnet working with the GUI, but not with a form action
Hey Marcus,
Thanks so much for all your help. We are very pleased so far with what we have going on with msNet. I do have another question for you. So right now as the macro finishes we'r able to take advantage of MACRO_RESULT to let us know that it's done. Is there a way for the Macro to communicate back to the server/website mid Macro instead of just at the end with MACRO_RESULT?
For example, I'd like for our macro to report back how far along the way it is / how close it is to finishing. Is there a function that's already there that we can use for this? Thanks Marcus!
- Enrico
Thanks so much for all your help. We are very pleased so far with what we have going on with msNet. I do have another question for you. So right now as the macro finishes we'r able to take advantage of MACRO_RESULT to let us know that it's done. Is there a way for the Macro to communicate back to the server/website mid Macro instead of just at the end with MACRO_RESULT?
For example, I'd like for our macro to report back how far along the way it is / how close it is to finishing. Is there a function that's already there that we can use for this? Thanks Marcus!
- Enrico
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: MSnet working with the GUI, but not with a form action
No, sorry. That isn't how web CGI works anyway. Same with PHP etc. You get one output buffer, there's no asynchronous communication method here.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?