USA
Asked — Edited

Browser Script Command

I can open a web page with the script command ... Browser("000.000.000.000"). How do I get the browser to close when I want it too through a script command?


ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

#1  

I don't believe closing is a native feature. You would need to make a batch file to do this, and then have ARC que the batch file.

PRO
Synthiam
#2  

There's no simple way to know what the handle of the window that was opened is. The answer to this question is "ARC has no idea what the operating system did with the url". ARC can only assume the URL was opened with an "application" by the operating system.

Maybe a plugin that provides a full screen web browser view would be useful to you?

#3  

I was thinking that the URL always opens with your default browser, so just have a batch file which task-kills the browser.

#4  

It's no big deal really. I have a ESP8266 with a temperature sensor in my garage that also has a web server built in it. I open my browser on my phone/pc and check the temp. to make sure the garage heater is working and nothing freezes. On the phone/pc no problem, just close out the browser, when opening it in EZB there was no way to close it. Like I said no big deal here, was just wondering if I missed some command to close it. I do plan on using multiple ESP8266 sensors around the house, what would you guys say is the best way to get that info into EZB?

Thanks for the replies guys.

#5  

Geturl() will pull the entire web page in, then you need to parse it for the data you are looking for. Works great on simple web pages. Takes some work on complex ones.

Alan

PRO
Synthiam
#6  

Yeah I would just get the data directly from The ESP, since you have control over the sourcecode. Simply add a tcp listener on a port that returns the current voltage when a connection is established and then closes the port again. That would be the easiest rather than needing to parse data.

Or check if your ESP project has a webservice URL.