<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Tagged with savestrings() - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=savestrings%28%29</link>
      <pubDate>Sun, 08 Aug 2021 18:41:23 +0000</pubDate>
         <description>Tagged with savestrings() - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/taggedsavestrings%28%29/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>saveStrings()</title>
      <link>https://forum.processing.org/two/discussion/28071/savestrings</link>
      <pubDate>Fri, 13 Jul 2018 00:47:52 +0000</pubDate>
      <dc:creator>OrangeFrog</dc:creator>
      <guid isPermaLink="false">28071@/two/discussions</guid>
      <description><![CDATA[<p>I am having trouble using the saveStrings() function. I am using it in APDE. But I have tried the same code on processing 3.2.1.</p>

<pre><code>String sentence = "This is a sentence";
String[] save;
String[] load;

void setup(){
  size(displayWidth, displayHeight);
  background(0);
  fill(0,0,255);
  textAlign(CENTER);
  textSize(64);

  save = split(sentence, " ");
  text(save[0], width/2, height*0.2);
  text(save[1], width/2, height*0.4);
  saveStrings("strings.txt", save);
  load = loadStrings("strings.txt");
  text(load[2], width/2, height*0.6);
  text(load[3], width/2, height*0.8);
}
</code></pre>

<p>This should output the words "This is a sentence" down the middle of the window. However it returns an error saying that the index called is longer than the string length, for <code>text(load[2], width/2, height*0.6);</code>. Meaning the the variable "load" didn't load in anything from "strings.txt". I know this is an issue with saveStrings() because when I open strings.txt and put in 1, 2, 3, 4 on different lines, the code ouputs "This is 3 4" down the middle. Also when I check strings.txt it doesn't have the String[] saved.
I've tried putting strings.txt in different locations but it still doesn't work.</p>
]]></description>
   </item>
   <item>
      <title>Problems while saving a xml file</title>
      <link>https://forum.processing.org/two/discussion/27933/problems-while-saving-a-xml-file</link>
      <pubDate>Mon, 07 May 2018 14:58:55 +0000</pubDate>
      <dc:creator>erwrow</dc:creator>
      <guid isPermaLink="false">27933@/two/discussions</guid>
      <description><![CDATA[<p>Hi everyone, as the title suggest, i'm having an issue when i try to save a xml file.</p>

<p>basically the problem is that when i try to save a xml file with the function "saveXML()" it changes some chars, for example, if a variable has the char "&amp;" it gets changed with "&amp; amp;".</p>

<p>Any idea on what is happening?</p>

<p>(Mod edit, broke the html entity so it's visible)</p>
]]></description>
   </item>
   <item>
      <title>Saving a high score</title>
      <link>https://forum.processing.org/two/discussion/27627/saving-a-high-score</link>
      <pubDate>Mon, 02 Apr 2018 02:05:11 +0000</pubDate>
      <dc:creator>OliverC</dc:creator>
      <guid isPermaLink="false">27627@/two/discussions</guid>
      <description><![CDATA[<p>Hi all! Hope you're having a good day.</p>

<p>I recently made an android game and I want to be able to save a high score. I've tried looking at other discussions on this forum but I couldn't find anything relevant to Android mode. Most of it was to do with Java mode. If it's relevant, I only need to save a single number at any one point in time.</p>

<p>Here are the steps that I believe I need to take in order to create a high score:</p>

<ol>
<li><p>Upon opening the app, check if a highscore.txt file is saved and if so, load it. Otherwise, create a new highscore.txt file with its only content being '0'.</p></li>
<li><p>Upon 'death', aka playing and losing the game, compare the number in the highscore.txt file against the current score.</p></li>
<li><p>Overwrite the highscore.txt file with the higher score.</p></li>
</ol>

<p>My score is an int value named currentScore.</p>

<p>I've tried tinkering around to implement it myself, but I don't know where to start with permissions and everything.</p>

<p>Any help would be greatly appreciated! Have a nice day :)</p>
]]></description>
   </item>
   <item>
      <title>Saving a text file with an extension other than .txt</title>
      <link>https://forum.processing.org/two/discussion/26795/saving-a-text-file-with-an-extension-other-than-txt</link>
      <pubDate>Tue, 13 Mar 2018 00:25:59 +0000</pubDate>
      <dc:creator>ThrashJazzAssassin</dc:creator>
      <guid isPermaLink="false">26795@/two/discussions</guid>
      <description><![CDATA[<p>I'm trying to save(an_array_of_strings, "filename.xyz") but p5 keeps wanting to save as... filename.xyz.txt</p>

<p>Can I save it without the added .txt?</p>

<p>Thanks</p>
]]></description>
   </item>
   <item>
      <title>How to save text into new txt everytime you save it</title>
      <link>https://forum.processing.org/two/discussion/25541/how-to-save-text-into-new-txt-everytime-you-save-it</link>
      <pubDate>Tue, 12 Dec 2017 20:24:57 +0000</pubDate>
      <dc:creator>Caseguy</dc:creator>
      <guid isPermaLink="false">25541@/two/discussions</guid>
      <description><![CDATA[<p>This is the code, this code saves the written text into a txt, but it always saves it into the same one, so the older text written in the txt file gets deleted. I would like it to save it into a new txt everytime the program saves it . How do i do so.</p>

<p>and another thing: how do i load the text in txt into the document, by clicking on another button :)</p>

<p>thanks in advance :)</p>

<pre><code>String str = "";

void setup(){
  size(400,400);
}

void draw(){
  background(0);
  fill(255);
  text(str,20,20,100,height-20);
  fill(128);
  if( over() ){
    fill(196);
  }
  rect(width-20,height-20,20,20);
}

boolean over(){
  return( mouseX&gt;width-20 &amp;&amp; mouseY &gt; height-20 );
}

void keyPressed(){
  if( keyCode == DELETE || keyCode == BACKSPACE ){
    if( str.length() &gt; 0 ){
      str = str.substring(0, str.length()-1);
    }
  } else {
    if( key != CODED ){
      str += key;
    }
  }
}

void mousePressed(){
  if( over() ){
    saveIt();
  }
}

void saveIt(){
  String[] strs = { str };
  saveStrings( "text.txt", strs );
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>How can i make it possible to write freely and save it in processing.</title>
      <link>https://forum.processing.org/two/discussion/25531/how-can-i-make-it-possible-to-write-freely-and-save-it-in-processing</link>
      <pubDate>Tue, 12 Dec 2017 07:03:17 +0000</pubDate>
      <dc:creator>Caseguy</dc:creator>
      <guid isPermaLink="false">25531@/two/discussions</guid>
      <description><![CDATA[<p>The thing that i would like is to make a program that would let me type anthing that i want, and then when I click on a button the text that i have written in the program will be saved into a txt file.</p>
]]></description>
   </item>
   <item>
      <title>saveStrings(), but in the internet</title>
      <link>https://forum.processing.org/two/discussion/25282/savestrings-but-in-the-internet</link>
      <pubDate>Wed, 29 Nov 2017 20:12:17 +0000</pubDate>
      <dc:creator>creepercrack</dc:creator>
      <guid isPermaLink="false">25282@/two/discussions</guid>
      <description><![CDATA[<p>How can I save Strings into a text file in the internet using a url, like the <code>saveStrings()</code> method, but in a text file saved in the internet?</p>
]]></description>
   </item>
   <item>
      <title>How can I specify (increase) the maximum row count in a table in processing</title>
      <link>https://forum.processing.org/two/discussion/24993/how-can-i-specify-increase-the-maximum-row-count-in-a-table-in-processing</link>
      <pubDate>Tue, 14 Nov 2017 00:40:34 +0000</pubDate>
      <dc:creator>Sparky</dc:creator>
      <guid isPermaLink="false">24993@/two/discussions</guid>
      <description><![CDATA[<p>I am using processing.org to collect a large amount of data and put it in a table. I then write this table to a CSV file. The code I have works great until I get around 1 million rows in my table. After that I get messages in the console saying:</p>

<p><strong>"Note: setting maximum row count to 1,310,720 (resize took 1,654 ms)".</strong></p>

<p>This makes my program take ages to run. I added a <strong>setRowCount();</strong> line to my code but this did not remedy my issue, it gave me an empty table. Here is my code with the added line:</p>

<pre lang="processing">
// stuff is a large array of values &gt; 1 million
t = new Table();
t.setRowCount(10000000);  
t.addColumn("Stuff"); 
for( int i = o; i &lt; stuff.length; i++) 
    {  
    TableRow newRow = t.addRow(); 
    newRow.setFloat("Stuff", stuff[i]);
    } 
saveTable(t, "data.csv");
</pre>
]]></description>
   </item>
   <item>
      <title>String[] is always [Ljava.lang.String;@7638c30f</title>
      <link>https://forum.processing.org/two/discussion/25105/string-is-always-ljava-lang-string-7638c30f</link>
      <pubDate>Mon, 20 Nov 2017 07:46:18 +0000</pubDate>
      <dc:creator>RockyHawk</dc:creator>
      <guid isPermaLink="false">25105@/two/discussions</guid>
      <description><![CDATA[<p>I am making a piece of code and I have a string[] declared called recs. I have lots of debug println(recs); in the code and they all return something that looks similar to [Ljava.lang.String;@7638c30f. I am using the networking library and sound library.</p>

<pre><code>import processing.net.*;
import processing.sound.*;
Server server;
String rec;
String[] recs = {"0"};
String[] tables = {};
String[] blank = {};
void settings() {
  fullScreen();
}
void setup(){
  size(displayWidth,displayHeight,P2D);
  background(255,255,244);
  server = new Server(this, 5204);
  println("recs debug:" + recs);
  for(int i = 0; i &lt; loadStrings("data/data/tables.txt").length; i++) {
    for(int s = 1; s &lt; split(loadStrings("data/data/tables.txt")[i], "$").length; s++) {
      tables = append(tables, split(loadStrings("data/data/tables.txt")[i], "$")[0] + split(loadStrings("data/data/tables.txt")[i], "$")[s]);
    }
  }
}
void draw(){
  imageMode(CENTER);
  textAlign(CENTER);
  textSize(20);
  fill(0);
  Client client = server.available();
  if (client != null) {
    String incomingMessage;
    incomingMessage = client.readString(); 
    incomingMessage = incomingMessage.trim();
    recs = new String[] {};
    println("Recieved: " + incomingMessage);
    rec = incomingMessage;
    println("recs before:" + recs);
    recs = split(rec, "$");
    println("recs after:" + recs);
    refresh();
  }

}
void refresh(){
  String[] table = {};
  table = loadStrings("data/data/" + recs[0] + ".txt");
  println("table:" + table);
  println("recs:" + recs);
  println("rec:" + rec);
  if(table[0] == "done"){
    saveStrings("data/data/" + recs[1] + ".txt", blank);
  }else{
    for(int i = 1; i &lt; (recs.length-1); i++) {
      table = append(table, recs[i]);
      saveStrings("data/data/" + recs[0] + ".txt", table);
    }
  }
}
void serverEvent(Server server, Client client) {
  println(" A new client has connected: "+ client.ip());
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Saving an array as a file</title>
      <link>https://forum.processing.org/two/discussion/23815/saving-an-array-as-a-file</link>
      <pubDate>Mon, 14 Aug 2017 23:24:14 +0000</pubDate>
      <dc:creator>wjsandbe</dc:creator>
      <guid isPermaLink="false">23815@/two/discussions</guid>
      <description><![CDATA[<p>I have an array, called "saved", that is a collection of index numbers of objects, called "instruments". I also have a "Save" button; when pressed the "Save" button calls the Saves() function, which stores the index numbers of some objects (instruments) and stores the numbers.</p>

<p>What I am trying to do is then take that array and save it as a file, like json or txt file, that I can load at a later date and then use the numbers stored in the array. I have tried using saveJSON() and saveText, as well as some others, but I cannot get it to work. So how do I save an array as a type of file that I can load at a later time. Below is my code:</p>

<pre><code>var saved = [];

function setup(){
  createCanvas(950, 700);
  var saver = createButton("Save");
  saver.size(width / 11, width / 11);
  saver.position(instruments[0].x - (instruments[0].r * 4), instruments[223].y + (instruments[0].r / 2));
  saver.mousePressed(Saves);
    }

    function Saves() {
  for (var i = 0; i &lt; instruments.length; i++) {
    if (instruments[i].active === true) {
      append(saved, i);
    }
  }
</code></pre>
]]></description>
   </item>
   <item>
      <title>How to replace something in the data folder in the code?</title>
      <link>https://forum.processing.org/two/discussion/23633/how-to-replace-something-in-the-data-folder-in-the-code</link>
      <pubDate>Sat, 29 Jul 2017 23:45:11 +0000</pubDate>
      <dc:creator>Budderlord27</dc:creator>
      <guid isPermaLink="false">23633@/two/discussions</guid>
      <description><![CDATA[<p><code>String[] lines;
int[] linesint;
void setup() {
size(500,500);
String[] line = loadStrings("list.txt");
lines = line;
linesint = int(split(line[0], ENTER));
}
void draw() {
background(255);
fill(0);
for(int i = 0; i&lt;lines.length; i++) {
text(lines[i],(i*50)+50,50);
}
}
void mouseClicked() {
if (mouseY&lt;450) {
linesint[0]++;
lines[0] = ""+linesint[0];
} if (mouseY&gt;450) {
saveStrings("list.txt", lines);
}
}</code>
I'm testing out using text files and I ran into a problem, that being when I run saveStrings() it doesnt place the file in the data folder. This means that it doesnt use the saved file next time I run the program. I want to make a kind of save system being that you use a txt file to save all the variables, but that cant happen when it makes an entirely new txt file every time. Basically, how do you replace files in the data folders?</p>
]]></description>
   </item>
   <item>
      <title>Help with translation calculations</title>
      <link>https://forum.processing.org/two/discussion/22377/help-with-translation-calculations</link>
      <pubDate>Thu, 04 May 2017 01:21:56 +0000</pubDate>
      <dc:creator>Vanthex</dc:creator>
      <guid isPermaLink="false">22377@/two/discussions</guid>
      <description><![CDATA[<p>Hi guys,
In this sketch, the user should be able to zoom in and out relative to the mouse's position. However the more you zoom in/out, the larger the error of translation there is.
gif link:
<a href="https://gyazo.com/bc19520eb98509299f9d0af9be548228" target="_blank" rel="nofollow">https://gyazo.com/bc19520eb98509299f9d0af9be548228</a></p>

<p>This is how I calculated the translation:
trans += getStriplength() * deltascale
getStriplength returns the length of the whole strip of objects while deltascale is the amount that is reduced each time when the mouse scrolls. Its default value is 0.2, which means the objects will be either 1.02 times bigger or 0.98 times smaller than the original.
Therefore I am getting the difference of the lengths of the strip before and after, and adding it to the offset. However as I mentioned before it doesn't work the more you zoom in/out. Any help will be appreciated!</p>

<p>Code:</p>

<pre><code>PImage backgroundImage;
PFont font;
int x = 0;
int xoffset = 0;
int deltax = 5;
float scale = 512/30;
float deltascale = 0.02;
ArrayList&lt;celestialObject&gt; ObjectList;
String[] objectfile;
String[] configfile;
int savetimer = 0;
static int screenwidth = 1920;
static int screenheight = 1080;
float trans = 0;

class celestialObject {
  String name;
  float diameter;
  String unit;
  String sprite;
  PImage img;
  int wid;
  int hei;
  int xpos;

  celestialObject(String Oname, float Odiameter, String Ounit, String Oimg) {
    name = Oname;
    diameter = Odiameter;
    unit = Ounit;
    sprite = Oimg;
    img = loadImage(Oimg);
    wid = img.width;
    hei = img.height;
  }
}

void setup() {
  size(1920, 1080);
  frameRate(200);
  objectfile = loadStrings("objects.txt");
  configfile = loadStrings("config.ini");
  backgroundImage = loadImage("background.png");
  font = createFont("Franklin Gothic Book Regular.ttf", 32);
  textFont(font, 32);
  textAlign(CENTER, CENTER);
  imageMode(CENTER);
  ObjectList = new ArrayList();
  readObjects();
  readConfig();
  loadOffset();
}

void addObject(String Aname, float Adiameter, String Aunit, String Aimg) {
  println("Loading "+Aname);
  if (Aimg.equals("null")) {
    ObjectList.add(new celestialObject(Aname, Adiameter, Aunit, "images/"+Aname+".png"));
  } else {
    ObjectList.add(new celestialObject(Aname, Adiameter, Aunit, "images/"+Aimg));
  }
}

void readObjects() {
  for (int i = 0; i &lt; objectfile.length; i++) {
    String[] currentObject = split(objectfile[i], ",");
    addObject(currentObject[0], float(currentObject[1]), currentObject[2], currentObject[3]);
  }
}

void readConfig() {
  for (int i = 0; i &lt; configfile.length; i++) {
    char slash = configfile[i].charAt(0);
    if (slash != '/') {
      //getting config values based on line number
      if (i == 1) {
        xoffset = int(configfile[i]);
      } else if (i == 3) {
        scale = float(configfile[i]);
      }
    }
  }
}

void loadOffset() {
  //for (int i = 0; i &lt;= xoffset; i++) {
  //  int x = 0 + xoffset;
  //  for ( celestialObject drawObject : ObjectList ) {         
  //    float dia;
  //    if (drawObject.unit.equals("km")) {
  //      dia = drawObject.diameter * 1000;
  //    } else {
  //      dia = drawObject.diameter;
  //    }
  //    int drawWidth = int(scale * dia);
  //    //checks if image is too small to be drawn
  //    if (x+drawObject.img.width &gt;= 0 &amp;&amp; x &lt;= 1500) {
  //      int drawWidth = int(scale * dia);
  //      int drawHeight = int(drawWidth * drawObject.hei / drawObject.wid);
  //      if (drawWidth &gt; 0 &amp;&amp; drawHeight &gt; 0) {
  //        //drawObject.img.resize(drawWidth, drawHeight);
  //        image(drawObject.img, x+(drawWidth/2), 400,drawWidth, drawHeight);
  //        //calculates font size relative to object's current size
  //        int textSize;
  //        //checks if the name or diameter is longer, then uses the longer one for calculation
  //        if (drawObject.name.length() &lt; str(drawObject.diameter).length()) {
  //          textSize = int(drawObject.img.width/str(drawObject.diameter).length());
  //        } else {
  //          textSize = int(drawObject.img.width/drawObject.name.length());
  //        }
  //        if (textSize &gt; 0) {
  //          textSize(textSize);
  //          float texty = 418+(drawObject.img.height/2);
  //          if (texty &lt; (418+(drawObject.img.height/2))) {
  //            texty = 418;
  //          }
  //          text(drawObject.name, x+(drawObject.img.width/2), texty);
  //          text(drawObject.diameter+drawObject.unit, x+(drawObject.img.width/2), texty+textSize);
  //        }
  //      }
  //    }
  //    drawObject.xpos = x;
  //    x += (drawObject.img.width*0.08 + drawObject.img.width);
  //  }
  //}
}

void draw() {
  image(backgroundImage, screenwidth/2, screenheight/2);
  int x = int(0 + xoffset + trans);
  for ( celestialObject drawObject : ObjectList ) {
    float dia;
    if (drawObject.unit.equals("km")) {
      dia = drawObject.diameter * 1000;
    } else {
      dia = drawObject.diameter;
    }
    int drawWidth = int(scale * dia);
    if (x+(scale*dia) &gt;= 0 &amp;&amp; x &lt;= screenwidth) {
      //checks if image is too small to be drawn 
      int drawHeight = int(drawWidth * drawObject.hei / drawObject.wid);
      if (drawWidth &gt; 0 &amp;&amp; drawHeight &gt; 0) {
        //drawObject.img.resize(drawWidth, drawHeight);
        image(drawObject.img, x+(drawWidth/2), screenheight/2, drawWidth, drawHeight);
        //calculates font size relative to object's current size
        int textSize;
        //checks if the name or diameter is longer, then uses the longer one for calculation
        if (drawObject.name.length() &lt; str(drawObject.diameter).length()) {
          textSize = int(drawWidth/str(drawObject.diameter).length());
        } else {
          textSize = int(drawWidth/drawObject.name.length());
        }
        if (textSize &gt; 0) {
          textSize(textSize);
          float texty = screenheight/2+18+(drawHeight/2);
          if (texty &lt; (screenheight/2+18+(drawHeight/2))) {
            texty = screenheight/2+18;
          }
          text(drawObject.name, x+(drawWidth/2), texty);
          text(drawObject.diameter+drawObject.unit, x+(drawWidth/2), texty+textSize);
        }
      }
    }
    drawObject.xpos = x;
    x += (drawWidth*0.08 + drawWidth);
  }
  //display deltax
  textSize(32);
  text(str(deltax), screenwidth-50, 10);
  text(str(deltascale), screenwidth-50, 50);
  //display Saved
  if (savetimer &gt; 0) {
    text("Saved", screenwidth-50, 90);
    //text(str(savetimer),1450,130);
  }
  if (savetimer &gt; 0) {
    savetimer -= 1;
  }
  //println(str(scale));
}

void mouseWheel(MouseEvent event) {
  float e = event.getCount();
  if (e &lt; 0) {
    scale *= (1 + deltascale);
    mouseX = xoffset;
    trans -= (getStriplength() * deltascale);
  } else if (e &gt; 0) {
    scale *= (1 - deltascale) ;
    mouseX = xoffset;
    trans += (getStriplength() * deltascale);
  }
}

void keyPressed() {
  if (key == CODED) {
    if (keyCode == LEFT) {
      xoffset += deltax;
    } else if (keyCode == RIGHT) {
      xoffset -= deltax;
    } else if (keyCode == UP) {
      deltax += 5;
    } else if (keyCode == DOWN) {
      deltax -= 5;
    }
  }
  if (key == 's') {
    for (int i = 0; i &lt; configfile.length; i++) {
      if (i == 1) {
        configfile[i] = str(xoffset);
      } else if (i == 3) {
        configfile[i] = str(scale);
      }
    }
    saveStrings("config.ini", configfile);
    savetimer = 500;
  } else if (key == 'q') {
    deltascale += 0.02;
  } else if (key == 'a') {
    deltascale -= 0.02;
  }
  if (deltax &lt; 0) {
    deltax = 0;
  } else if (deltascale &lt; 0) {
    deltascale = 0;
  }
}

float getStriplength() {
  float x = 0;
  int i = 0;
  for ( celestialObject getObject : ObjectList ) {
    float dia;
    if (getObject.unit.equals("km")) {
      dia = getObject.diameter * 1000;
    } else {
      dia = getObject.diameter;
    }
    int drawWidth = int(scale * dia);
    x += (drawWidth*0.08 + drawWidth);
    i++;
    //println(ObjectList.size());
    if (i == ObjectList.size()) {
       x -= drawWidth*0.08;
    }
    //println(x);
  }
  //println(x);
  return x;  
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>saveString with button</title>
      <link>https://forum.processing.org/two/discussion/21745/savestring-with-button</link>
      <pubDate>Sat, 01 Apr 2017 14:14:34 +0000</pubDate>
      <dc:creator>gius</dc:creator>
      <guid isPermaLink="false">21745@/two/discussions</guid>
      <description><![CDATA[<p>Hello everyone,
I want to save the text written in textArea,</p>

<pre><code>import processing.video.*;
import g4p_controls.*;

import java.awt.Font;
GTextArea textArea;
String txtMain ="";






Capture cam;
GButton btnSave;

int n = 1;

void setup() {
  size(1024,768); 


  textArea = new GTextArea(this, 110, 670, 200, 100, G4P.SCROLLBARS_BOTH | G4P.SCROLLBARS_AUTOHIDE);
  textArea.setFont(new Font("", Font.PLAIN, 20));

    cam = new Capture(this,640,480);
    cam.start();
  }
}

void draw() {
  if (cam.available() == true) {
    cam.read();
  }
  image(cam,0,0,width,height); 
}


public void handleButtonEvents(GButton button, GEvent event) {
  if (button == btnSave) {


}
</code></pre>

<p>in reference there is the procedure:</p>

<p>String words = "apple bear cat dog";
   String[] list = split(words, ' ');</p>

<p>saveStrings("nouns.txt", list);</p>

<p>I have difficulty understanding how to add in my code, can you help me by explaining?</p>

<p>Thank you!</p>
]]></description>
   </item>
   <item>
      <title>android mode saveStrings()</title>
      <link>https://forum.processing.org/two/discussion/20095/android-mode-savestrings</link>
      <pubDate>Fri, 06 Jan 2017 06:23:38 +0000</pubDate>
      <dc:creator>daniel0818</dc:creator>
      <guid isPermaLink="false">20095@/two/discussions</guid>
      <description><![CDATA[<p>How do I saveStrings() to an existing .txt file in the data folder in android mode?</p>
]]></description>
   </item>
   <item>
      <title>lines in a text file in Glabel</title>
      <link>https://forum.processing.org/two/discussion/19825/lines-in-a-text-file-in-glabel</link>
      <pubDate>Mon, 19 Dec 2016 12:28:59 +0000</pubDate>
      <dc:creator>gada94</dc:creator>
      <guid isPermaLink="false">19825@/two/discussions</guid>
      <description><![CDATA[<p>I have saved three lines in a text file and three Glabel, how to save every life in Glabel ??? That is:
line 1 in Glabel 1
line 2 in Glabel 2
line 3 in Glabel3</p>

<p>the easiest it will cycle through "for", but as a change in the cycle variable name Glabel?</p>

<p>for(int i=0; i&lt;+2;i++)
{
   ['label'+і].setText(reader.readLine());} So not working</p>
]]></description>
   </item>
   <item>
      <title>saving a highscore</title>
      <link>https://forum.processing.org/two/discussion/19719/saving-a-highscore</link>
      <pubDate>Tue, 13 Dec 2016 12:52:43 +0000</pubDate>
      <dc:creator>TitusMachine_</dc:creator>
      <guid isPermaLink="false">19719@/two/discussions</guid>
      <description><![CDATA[<p>Hey guys, 
Can someone help me out with saving my score to a .txt file? I do somehow know that it's wrong the way a programmed it but I don't know how to code it on the right way. Can someone help me out what i suppose to do? I've yet looked up all the processing reference pages of working with saveString and loadString, but I don't know why I don't succeed at saving it to a .txt file when the score is higher than the highScore from the .txt file.</p>

<p>It only works when I uncomment line 27 but than it doesn't check if score is bigger than the highScore</p>

<pre><code>String highScore="";

String highScore="";

int score;

void setup()
{

}

void draw()
{
  String lines[] = loadStrings("highScore.txt");
  println("there are " + lines.length + " lines");
  for (int i = 0 ; i &lt; lines.length; i++)
  {
    println(lines[i]);
  }

  println(score);
}

void keyPressed()
{
  if(keyCode==UP)
  {
    String[] scoreList= split(highScore, ' ');
    if(parseInt(scoreList[0])&gt;score)
    {
      highScore= str(score);

      saveStrings("highScore.txt", scoreList);
    }
  }
}

void mousePressed()
{
  if(mouseButton==LEFT)
  {
    score+=100;
  }
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>How to stop Processing from overwriting txt file?</title>
      <link>https://forum.processing.org/two/discussion/18707/how-to-stop-processing-from-overwriting-txt-file</link>
      <pubDate>Tue, 25 Oct 2016 17:08:17 +0000</pubDate>
      <dc:creator>Mitch_</dc:creator>
      <guid isPermaLink="false">18707@/two/discussions</guid>
      <description><![CDATA[<p>Im wrote the following code but i wanna make it so that it will not overwrite the existing strings in the .txt file. Every time i run the sketch the createWriter command overwrites the .txt file. How do i make it so that it keeps the strings in the .txt file even when i run the sketch again?</p>

<p>Also i only want to print the first 10 lines of the txt file in the console when i press the ENTER key. But if the file contains only 3 lines i get an ArrayIndexOutOfBoundsException. How do i stop this from happening?</p>

<pre><code>PrintWriter history;

void setup() {
  size(700, 350);
  history = createWriter("history.txt");
}

void draw() {
}

void keyPressed() {
  if ((key=='1')) { 
    history.println("User pressed 1");
  }

  if ((key=='2')) { 
    history.println("User pressed 2");
  }

  if ((key == ENTER)) {
    history.flush(); 
    history.close();
    String[] history = loadStrings("history.txt");
    for (int i = 0; i &lt;= 9; i++) { //only print first 10 lines
        printArray("[" + i + "] " + history[i]);
    }
  }
}
</code></pre>

<p>Any help will be appreciated :)</p>
]]></description>
   </item>
   <item>
      <title>saveStrings() makes file one character per line. (P5.js)</title>
      <link>https://forum.processing.org/two/discussion/18554/savestrings-makes-file-one-character-per-line-p5-js</link>
      <pubDate>Sat, 15 Oct 2016 06:28:57 +0000</pubDate>
      <dc:creator>AndyD</dc:creator>
      <guid isPermaLink="false">18554@/two/discussions</guid>
      <description><![CDATA[<p>My first post here (and thanks to everyone involved in P5.js for re-igniting my interest in coding)...</p>

<p>I am trying to write data to a text file with multiple characters per line but saveStrings() isn't working for me. It acts the same as save() and gives me just one character per line.</p>

<p>eg:
  dataList = "String";
  saveStrings(dataList, 'dataString.txt');</p>

<p>gives me a text file with:</p>

<p>S
t
r
i
n
g</p>

<p>Am I missing something?</p>
]]></description>
   </item>
   <item>
      <title>saveStrings dilemma</title>
      <link>https://forum.processing.org/two/discussion/18538/savestrings-dilemma</link>
      <pubDate>Fri, 14 Oct 2016 02:13:35 +0000</pubDate>
      <dc:creator>starcat</dc:creator>
      <guid isPermaLink="false">18538@/two/discussions</guid>
      <description><![CDATA[<p>Error on line 43: I need "cur" to be entered into my "to_match" file whenever it's not already there. Never used saveStrings before and it's doing my head in. Please advise. Thank you!!</p>

<pre><code>String[] to_match;
String[] resps;
String top = "Ask me anything.";
String cur = "";
final int QUERY_LIMIT = 35;

void setup() {
  size(1200, 500);
  textSize(20);
  fill(0);
  PFont jackFont;
  jackFont = loadFont("CourierNewPSMT-48.vlw");
  textFont(jackFont);
  to_match = loadStrings("to_match_file.txt");
  resps = loadStrings("resps_file.txt");
}

void draw() {
  background(255);
  fill(0);
  text(top, 20,20, 1200,500);
  fill(225, 0, 0);
  text("&gt; "+ cur+((millis()%1000)&lt;500?(" "):("_")), 20,440, 1200,400);
}

void keyPressed() {
  if (key&gt;='a'&amp;&amp;key&lt;='z') {
    if (cur.length()&lt;=QUERY_LIMIT) cur =  cur + char(key+'A'-'a');
  }
  if (key&gt;='A'&amp;&amp;key&lt;='Z') {
    if (cur.length()&lt;=QUERY_LIMIT) cur =  cur + char(key);
  }
  if (key==' '&amp;&amp;(cur.length()&lt;=QUERY_LIMIT)) cur=cur+' ';
  if (key=='?'&amp;&amp;(cur.length()&lt;=QUERY_LIMIT)) cur=cur+'?';
  if (key==DELETE||key==BACKSPACE) {
    if (cur.length()&gt;0) cur=cur.substring(0, cur.length()-1);
  }
  if (key==ENTER||key==RETURN) {
    if(cur.charAt(cur.length()-1)!='?'){
      top = "Please ask a QUESTION.";
    } else {
      top = "I don't know. Ask something else.";
      saveStrings("to_match_file.txt", cur); 
    }
    for(int i=0; i &lt; to_match.length; i++){
      if(cur.equals(to_match[i])){
        top=resps[i];
      }
    }
    cur="";
  }
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Data received from Arduino to Processing, but is not saved in file</title>
      <link>https://forum.processing.org/two/discussion/18129/data-received-from-arduino-to-processing-but-is-not-saved-in-file</link>
      <pubDate>Sat, 10 Sep 2016 11:17:29 +0000</pubDate>
      <dc:creator>JRob</dc:creator>
      <guid isPermaLink="false">18129@/two/discussions</guid>
      <description><![CDATA[<p>Hello everybody</p>

<p>I'm currently trying to send some data from Arduino to Processing, so I can save it in a file.
To be more specific, there are two variables (frequency of a blinking LED and respective LED number) which should be saved in tabular form.</p>

<p>Hereby the following Processing code is used:</p>

<pre><code>import processing.data.Table;
import processing.serial.*;


Serial myPort;
Table dataTable; //table to store my values.

int lf = 10;
String Arduinostring = null;
float values;

String fileName;
void setup()
{
  String portName = Serial.list()[0]; 
  myPort = new Serial(this, portName, 9600); //the port I'm using to listen to the serial port

  dataTable = new Table();
  dataTable.addColumn("id"); 


  //columns for values
  dataTable.addColumn("Data");
}

  void draw() {
    while (myPort.available() &gt; 0) {
      Arduinostring = myPort.readStringUntil(lf);
      if (Arduinostring != null) {
          print(Arduinostring);  // Prints String
          values=float(Arduinostring);  // Converts and prints float
          println(values);
      }
    TableRow newRow = dataTable.addRow(); //add a row for this new reading
    newRow.setInt("id", dataTable.lastRowIndex());//record a unique identifier (the row's index)

    //record information. 
    newRow.setFloat("Data", values);   
    }

    saveTable(dataTable, "data/new.csv"); // save it to computer.

}
</code></pre>

<p>My intention here is to get my data into the table (and into my file).
I managed to receive the required data (frequency, LED number), but this data isn't saved in my file.
The mentioned file is created by the way and at least has the right ID for each Row.</p>

<p>What I simply do not understand is that he can't save it though the received data should be converted to float with the command num=float(myString), shouldn't it?</p>

<p>Many thanks in advance for any help!</p>
]]></description>
   </item>
   <item>
      <title>DOS command -copy-, processing alternative</title>
      <link>https://forum.processing.org/two/discussion/17522/dos-command-copy-processing-alternative</link>
      <pubDate>Wed, 13 Jul 2016 18:11:57 +0000</pubDate>
      <dc:creator>dimzinas</dc:creator>
      <guid isPermaLink="false">17522@/two/discussions</guid>
      <description><![CDATA[<p>Hi there
I need to merge some files into one
Something similar to dos command ( copy *.txt merge.txt)
This DOS command merge all txt files to one text file
There is a way to do something like this with processing?</p>

<p>Thank you
Dimitrios</p>
]]></description>
   </item>
   <item>
      <title>Save textArea with ControlP5</title>
      <link>https://forum.processing.org/two/discussion/17330/save-textarea-with-controlp5</link>
      <pubDate>Mon, 27 Jun 2016 21:15:00 +0000</pubDate>
      <dc:creator>Jose_Aparecido</dc:creator>
      <guid isPermaLink="false">17330@/two/discussions</guid>
      <description><![CDATA[<p>Hello guys,</p>

<p>How could I save the contents of a textArea in a text file?</p>

<p>It worked to open normal as the example in the link below, but still managed to save not ... tried this code, but it gives error, the syntax is wrong ...</p>

<p><a href="https://forum.processing.org/one/topic/textarea-using-controlp5.html" target="_blank" rel="nofollow">https://forum.processing.org/one/topic/textarea-using-controlp5.html</a></p>

<p>stretch code:</p>

<pre><code>//String[] lines = loadStrings(textArea.getText());
//printArray(lines);

String lines = textArea.getText()
println(lines);

for (int i = 0; i &lt;= lines.length-1; i++){
   lineSave[i] = lines[i];
}

saveStrings(split(lineSave, "\n"));
</code></pre>

<p>Thanks in advance for your attention.</p>
]]></description>
   </item>
   <item>
      <title>HighScore after game is relaunched</title>
      <link>https://forum.processing.org/two/discussion/17158/highscore-after-game-is-relaunched</link>
      <pubDate>Wed, 15 Jun 2016 15:00:01 +0000</pubDate>
      <dc:creator>yashdhume</dc:creator>
      <guid isPermaLink="false">17158@/two/discussions</guid>
      <description><![CDATA[<p>so i used this:
highScore = max(score, highScore);
and now i need the highscore to save after relaunched.
Please help</p>
]]></description>
   </item>
   <item>
      <title>SaveStrings() gives a textfile with strange charakters</title>
      <link>https://forum.processing.org/two/discussion/16727/savestrings-gives-a-textfile-with-strange-charakters</link>
      <pubDate>Fri, 20 May 2016 23:31:22 +0000</pubDate>
      <dc:creator>technik5</dc:creator>
      <guid isPermaLink="false">16727@/two/discussions</guid>
      <description><![CDATA[<p>As you can see in the code below, I tried to save an Array to a .txt file (as well I tried it with .json) but couldn't get a result.
The console.log gives out the right things but the .txt as well as the .json-file only contain some strange charakters...as seen here: <strong>ºw^~)Þ</strong> and yes it does not change in size or charakter if using more words. Someone got an idea what is missing or terrible wrong?</p>

<pre><code>         //Save JSON-File

          if ((hit[3] == 1)) {
            var TextFile = ['Farbe','_','FarbeTank','_'];
            //var list = split(TextFile, 'z');

            saveStrings(TextFile, 'test.txt');
            saveStrings(list, 'test2.txt');

            /**
            var JSONObj = {
              "FarbeKarosserie" : {
                Farbname: cSavedColorName_K,
                Farbwerte: cSavedColor_K,
              }
            }
            save(JSONObj, 'engo_File.json', true);
            */            
            /**
            JSONObj= json={};
            json.id=0;
            json.Farbe_Karosserie=cSavedColorName_K;
            json.Farbe_Karosserie=cSavedColorName_T;
            json.name="test";
            */

            hit[3] = 0;
          }
</code></pre>
]]></description>
   </item>
   <item>
      <title>I created a arduino game and would like to save scores in txt file somehow , How do i?!??</title>
      <link>https://forum.processing.org/two/discussion/16217/i-created-a-arduino-game-and-would-like-to-save-scores-in-txt-file-somehow-how-do-i</link>
      <pubDate>Sun, 24 Apr 2016 00:52:20 +0000</pubDate>
      <dc:creator>cvntwn</dc:creator>
      <guid isPermaLink="false">16217@/two/discussions</guid>
      <description><![CDATA[<p>Heyy guys !
New arduino and proccesing user and ive recently created this buzzwire game on arduino. It works pretty much the same as a stopwatch. I would like to know if it is possible to save the times using processing and how to do it !So when a player hits the stopwatch and his time appears on the arduino serial monitor i want that time to be saved Here is my current arduino code</p>

<p>`````unsigned long start, finished, elapsed, bonus;</p>

<p>void setup() // run once, when the sketch starts
{
  Serial.begin(9600); // set up Serial library at 9600 bps
  pinMode(2, INPUT); // start button
  pinMode(3, INPUT); // stop button
  pinMode(4,INPUT); // Wire touch</p>

<p>Serial.println("Press 1 for Start/reset, 2 for elapsed time");
}</p>

<p>void displayResult() //Fucntion converts elapsed time from miliseconds to minutes &amp; seconds
{
  float h, m, s, ms;
  unsigned long over;
  elapsed = finished - start;
  h = int(elapsed / 3600000);
  over = elapsed % 3600000;
  m = int(over / 60000);
  over = over % 60000;</p>

<p>ms = over % 1000;
  s = bonus + int(over / 1000);
  Serial.print("Raw elapsed time: ");
  Serial.println(elapsed);
  Serial.print("Elapsed time: ");
  Serial.print(h, 0);
  Serial.print("h ");
  Serial.print(m, 0);
  Serial.print("m ");
  Serial.print(s, 0);
  Serial.print("s ");
  Serial.print(ms, 0);
  Serial.println("ms");
  Serial.println();
}</p>

<p>void loop()
{
  if (digitalRead(2) == HIGH)
  {
    start = millis();
    delay(500); // for debounce
    Serial.println("Started...");
  }</p>

<p>if (digitalRead(4) == HIGH) 
  { 
    bonus += 1000; 
    delay(500); // for debounce 
    Serial.println("TOUCH");
  }</p>

<p>if (digitalRead(3) == HIGH)
  {
    finished = millis();
    delay(500); // for debounce
    displayResult();
  }
}````</p>
]]></description>
   </item>
   <item>
      <title>Problems with saving strings to file</title>
      <link>https://forum.processing.org/two/discussion/16174/problems-with-saving-strings-to-file</link>
      <pubDate>Thu, 21 Apr 2016 19:01:26 +0000</pubDate>
      <dc:creator>AmyM</dc:creator>
      <guid isPermaLink="false">16174@/two/discussions</guid>
      <description><![CDATA[<p>Im having problems saving a string to a txt file. The file.txt is in the data folder. I'm not sure what I am doing wrong.</p>

<pre><code>else if (hb0.value &gt;= hb0.max) {
        frameNum++;

        image(images[frameNum/10 %images.length], 800, 600);     

        port.write(1); 


        println("Here is the achievment"); 
        image(achievment2, 700, 100);
        String words = "Achievement achieved";
        String[] list = split(words , " ");

        saveStrings("file.txt", list);
        println("They are saved");
</code></pre>
]]></description>
   </item>
   <item>
      <title>reading and writing to a file to make a user</title>
      <link>https://forum.processing.org/two/discussion/15769/reading-and-writing-to-a-file-to-make-a-user</link>
      <pubDate>Wed, 30 Mar 2016 16:07:36 +0000</pubDate>
      <dc:creator>AmyM</dc:creator>
      <guid isPermaLink="false">15769@/two/discussions</guid>
      <description><![CDATA[<p>Hi guys.
So far I have a log in that only allows users from the actual code. I would like to change it to be reading and writing to a file? have you guys any advice how id do this?</p>

<pre><code>import static javax.swing.JOptionPane.*;
import javax.swing.JPasswordField;

final StringDict accounts = new StringDict(
  new String[] {
  "baptiste", "tanguy", "alexis"
  }
  , new String[] {
    "bap", "guy", "ex"
  }
  );

final JPasswordField pwd = new JPasswordField();

{
  println(accounts);
}

void draw() {
  if (frameCount == 1)  frame.setVisible(false);

  String user = askUser();

  if (user == null)           confirmQuit();
  else if (!"".equals(user))  askPass(user);
}

String askUser() {
  String id = showInputDialog("Please enter user:");

  if (id == null)
    showMessageDialog(null, "You've canceled login operation!"
      , "Alert", ERROR_MESSAGE);

  else if ("".equals(id))
    showMessageDialog(null, "Empty user input!"
      , "Alert", ERROR_MESSAGE);

  else if (!accounts.hasKey(id = id.toLowerCase()))
    showMessageDialog(null, "Unknown \"" + id + "\" user!" + (id = "")
      , "Alert", ERROR_MESSAGE);

  return id;
}

boolean askPass(String id) {
  boolean isLogged = false;
  pwd.setText("");

  int action = showConfirmDialog(null, pwd
    , "Now enter password:", OK_CANCEL_OPTION);

  if (action != OK_OPTION) {
    showMessageDialog(null, "Password input canceled!"
      , "Alert", ERROR_MESSAGE);

    return false;
  }

  String phrase = pwd.getText();
  //String phrase = new String(pwd.getPassword());

  if ("".equals(phrase))
    showMessageDialog(null, "Empty password input!"
      , "Alert", ERROR_MESSAGE);

  else if (accounts.get(id).equals(phrase)) {
    showMessageDialog(null, "Welcome \"" + id + "\"!\nYou're logged in!"
      , "Info", INFORMATION_MESSAGE);

    isLogged = true;
  } else
    showMessageDialog(null, "Password \"" + phrase + "\" mismatch!"
      , "Alert", ERROR_MESSAGE);

  return isLogged;
}

void confirmQuit() {
  if (showConfirmDialog(null, "Wanna quit then?", "Exit"
    , OK_CANCEL_OPTION) == OK_OPTION)  exit();
}
</code></pre>
]]></description>
   </item>
   <item>
      <title>Create Form, write to .txt string file, and read from it dynamically</title>
      <link>https://forum.processing.org/two/discussion/15660/create-form-write-to-txt-string-file-and-read-from-it-dynamically</link>
      <pubDate>Thu, 24 Mar 2016 02:59:43 +0000</pubDate>
      <dc:creator>Reconfigured_I</dc:creator>
      <guid isPermaLink="false">15660@/two/discussions</guid>
      <description><![CDATA[<p>Greetings all,</p>

<p>I'm trying to create a single project in Processing to do all the things I need.  Here's what I'd like to do:</p>

<ol>
<li>Have a single text entry box that would allow a user to type in a set number of characters.</li>
<li>a "submit" button that would then write this text to a .txt file as part of a running string / data store</li>
<li>Upon hitting submit, another item from the string .txt file would be called up and printed to a thermal printer that I have hooked to an Arduino Uno (that has firmata loaded up).</li>
</ol>

<p>I know how to do these things separately using HTML, PHP, and so on, and I can print to the thermal printer using Processing / Firmata.  I'm just looking for insight and guidance to try and do all this in one fell swoop.</p>

<p>Any time and direction is greatly appreciated.</p>

<p>Thank you.</p>
]]></description>
   </item>
   <item>
      <title>Problem with save data from serial port</title>
      <link>https://forum.processing.org/two/discussion/14931/problem-with-save-data-from-serial-port</link>
      <pubDate>Mon, 15 Feb 2016 18:23:54 +0000</pubDate>
      <dc:creator>Pedro_Henrique</dc:creator>
      <guid isPermaLink="false">14931@/two/discussions</guid>
      <description><![CDATA[<p>Hi guys I'm new with Processing development and I having some problems. here's the issue: I'm using an Arduino to measuere temperature and just wanna to send it to Processing by serial communication and store it in to a .txt file.
I have already searched a solution in Processing tutorials and in this forum, but didn't find yet.
Any help is welcome!!
Here is my code (the comments are in Portuguese):</p>

<pre>
//Ler os dados da porta serial e salvar num arquivo .txt

import processing.serial.*;
import cc.arduino.*;

Serial portaCOM5; //Cria um objeto da classe Serial
String dados, COM5; //Dados em ASCII recebidos do Arduino
int val ;// Dados recebidos pela porta serial

//Banco de dados
PrintWriter arquivo; 

void setup ()
{
  size (200, 200);
  frameRate(10);   
  
     
   println(Serial.list ()); //Lista no Prompt de Comando todas as portas seriais disponíveis
   
   COM5 = Serial.list()[0]; //Recebe a porta USB escolhida
   portaCOM5= new Serial(this, "COM5", 9600); //taxa de transfarencia 9600bps
   portaCOM5.bufferUntil('\n');
      
        //Banco de dados:
   arquivo = createWriter("temperaturas"+"_"+month()+"-"+day()+"-"+year()+"_"+hour()+"-"+minute()+"-"+
            second()+".txt"); //cria um arquivo para armazenar as temperaturas
    
    arquivo.print("Monitoramento de Temperatura DHT11");
    arquivo.println();    
  
}

void draw()
{
  background (255); //Ajusta cor de fundo como branca
  
  }
   
void serialEvent(Serial portaCOM5)
{
  
     COM5= Serial.list()[0]; //Recebe a porta USB escolhida
       
      
  while (portaCOM5.available()&gt;0)
  {
     val = portaCOM5.readString();
     arquivo.println();
  }
         
  arquivo.flush(); // Writes the remaining data to the file
  arquivo.close(); // Finishes the file
         
}

</pre>

<p>PS: When I check the monitor serial from Arduino, the data are there, so I believe anything here is wrong.</p>

<p>Thanks!!!!</p>
]]></description>
   </item>
   <item>
      <title>Creating Tables</title>
      <link>https://forum.processing.org/two/discussion/14756/creating-tables</link>
      <pubDate>Thu, 04 Feb 2016 11:42:16 +0000</pubDate>
      <dc:creator>rodrigolebrun</dc:creator>
      <guid isPermaLink="false">14756@/two/discussions</guid>
      <description><![CDATA[<p>Hi everyone.
So I'm now entering the world of creating, fetching and parsing data. Very very early stages at the moment and I'm already sweating. My task was to create a table that would save mouseX and mouseY data onto a table of max 10 lines. Pretty simple, pretty straight forward, but it doesn't work. I spent quite a good deal of time trying to understand why, iterating but I keep on getting the same error: "Array  index out of range:0" ... Help?
Here's the code. Thanks!</p>

<pre><code>Table table;
int counter=0;

void setup() {
  size(); 
  table= new Table();
  table.addColumn("id", Table.INT);
  table.addColumn("valueX", Table.INT);
  table.addColumn("valueY", Table.INT);
  saveTable(table, "data/new.csv");
}


void draw() {
  TableRow row=table.addRow();
  row.setInt("id", counter);
  row.setInt("valueX", mouseX);
  row.setInt("valueY", mouseY);

  counter++;



  //if (table.getRow()&gt;10) {
  //  table.removeRow(0);


  //}
}

void mousePressed() {
  exit();
}
</code></pre>
]]></description>
   </item>
   </channel>
</rss>