Loading...
Logo
Processing Forum
Ive been messing around with trying to read files in processing and i'm not having any luck. Ive been trying to follow some examples and stuff but I cant get it.
When I use this code it just prints all kinds of junk stuff. Can processing even read a google doc from URL?:

Copy code
  1.  void setup() { 
  2. size(50, 50);
  3. }

  4. void draw() {

  5.   String lines[]  = loadStrings("https://docs.google.com/document/d/1RbNheA0RyCmbv4livVtoiHjGraNCQEZM2hfWuZdCwsk/pub");
  6.   for (int i = 0 ; i < lines.length; i++) {

  7. println(lines[i]);

  8.   }
  9. }
also im trying to use the command 

Copy code
  1.  char a = lines.charAt(0);
but it says it cant do that with a String[]. Is there another command that might work the same?


Replies(3)

In line 8 you are reading in the web-page source HTML NOT the document. You can confirm this by using your browswer to look at the page source.

I don't know how to access the actual document there might be contributed library to use the GoogleDocs API
Hmm ok yeah I see what you mean. I wonder if theres a way to read the document from googledrive? like without publishing the document to the web. I'll try looking that up. Thanks for the reply.
Hmm so I tried looking at GoogleDocs API and can't find anything, that or can't understand it haha. So I am still having this same problem if anyone has another solution.
Thanks