
PRO
dbeard
USA
Asked

I have created a file by downloading data from the web.
this is the line of code
FileWrite($DataFile,HTTPGet($url1))
Where $DataFile is the file location on my harddrive and url1 is the where the data is on the web.
The data gets successfully wrote to the hard drive.
Now my next line of code is $line = FileReadLine($DataFile).
The first line of the Data file is: <!DOCTYPE html>
This fails with the error Input string was not in a correct format.
Now this used to work but with ARC this fails.
What format should the Datafile be in for this to continue?
Related Hardware EZ-B v4
If you're parsing data, i'd recommend using the javascript. The EZ-Script is quite terrible at parsing strings. While nothing has changed in the ezscript compiler, i imagine the webpage you're querying may have some changes that is breaking the parser. EZ-Script is not my favorite haha. Javascript is just so much more powerful (and 1000 times faster)
My goodness, I gotta learn Javascript. Do you have any recommendations on educational literature I can read that would give me a good idea of how to learn it?
Dave, it's so similar to ezscript... but easier i think.
The commands are all categorized in their own sections. For example, all File commands start with File. And all servo commands start with Servo. When you type the category, the drop down will display all commands in that category.
So you can move your robot by typing...
or you can create a variable like
or you can make reusable functions like
Or you can get super crazy...
IF conditions have open and closing braces...
But... how ever you decide to learn javascript, the Blockly in ARC generates javascript. So you can just use Blockly and look at the JavaScript code it generates...
Sweet. Thanks. I'll be looking closer at all this soon.
DJ I get the impression that ez-script wouldn’t be supported for much long and removed??
Does that mean all my ez-scripts projects will have to be converted to JavaScripts?
Question. I don't know JavaScript. But attempting something easy in JavaScript.
This code is the code in Blockly
It returns an error object has no method.
Can you get me past this hurdle. Also any suggestions on a book or website to help me learn java script.
JS equivalent:
test version: