<?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 #textfile - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=%23textfile</link>
      <pubDate>Sun, 08 Aug 2021 19:20:07 +0000</pubDate>
         <description>Tagged with #textfile - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/tagged%23textfile/feed.rss" rel="self" type="application/rss+xml" />
   <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>not succeed write data in text file using processing</title>
      <link>https://forum.processing.org/two/discussion/10660/not-succeed-write-data-in-text-file-using-processing</link>
      <pubDate>Tue, 05 May 2015 21:06:51 +0000</pubDate>
      <dc:creator>xaviXavi</dc:creator>
      <guid isPermaLink="false">10660@/two/discussions</guid>
      <description><![CDATA[<p>Hi all,</p>

<p>I created this function:</p>

<pre><code>void serialEvent(Serial myserial) {
  String result = myserial.readString();
  String[] resultArray = split(result, ' ');  
  saveStrings( "output.txt", resultArray );

print(resultArray);
 }
</code></pre>

<p>If arduino transmits  "1234" I receive that value in console processing, but when I want to write the same string in output.txt file it apeears just "4". Any idea why happens this?</p>
]]></description>
   </item>
   <item>
      <title>characters in an array with repetition number</title>
      <link>https://forum.processing.org/two/discussion/10202/characters-in-an-array-with-repetition-number</link>
      <pubDate>Mon, 06 Apr 2015 04:51:10 +0000</pubDate>
      <dc:creator>lilispi</dc:creator>
      <guid isPermaLink="false">10202@/two/discussions</guid>
      <description><![CDATA[<p>Hello! i need help. I'm reading a file.txt which data store them in an array. Now I want to read the file and count how many times each character is repeated and finally print the list of characters with the number of times this re repeats. Someone can tell me how could.</p>
]]></description>
   </item>
   <item>
      <title>Why will this not properly read a file.</title>
      <link>https://forum.processing.org/two/discussion/8376/why-will-this-not-properly-read-a-file</link>
      <pubDate>Thu, 27 Nov 2014 20:45:35 +0000</pubDate>
      <dc:creator>spamynator_1</dc:creator>
      <guid isPermaLink="false">8376@/two/discussions</guid>
      <description><![CDATA[<p>Despite the content of the file, all of the global variables are set to zero after running this code int setup. 
This is the code that reads from the file.</p>

<pre><code>  //Load Keybinds//
  loadkeybinds = loadTable("data/files/keybinds.conf", "header, csv");

  for (TableRow row : loadkeybinds.rows ()) {

    aspectratio = row.getFloat("aspectratio");
    resolutionx = row.getInt("resolutionx");
    resolutiony = row.getInt("resolutiony");
    loadup = row.getInt("key1");
    loaddown = row.getInt("key2");
    loadleft = row.getInt("key3");
    loadright = row.getInt("key4");
    loadhurt = row.getInt("key5");
    loadinventory = row.getInt("key6");
    loadmenu = row.getInt("key7");
    loadblock = row.getInt("key8");
  }
</code></pre>
]]></description>
   </item>
   <item>
      <title>Setting up the workflow for a text/video installation?</title>
      <link>https://forum.processing.org/two/discussion/8238/setting-up-the-workflow-for-a-text-video-installation</link>
      <pubDate>Wed, 19 Nov 2014 05:32:45 +0000</pubDate>
      <dc:creator>girolamomarri</dc:creator>
      <guid isPermaLink="false">8238@/two/discussions</guid>
      <description><![CDATA[<p>Hello,</p>

<p>I'm a visual artist and I never before worked with programming, if not indirectly delegating to others.</p>

<p>I'm currently working on a wall projection of sentences I will feed remotely through a website. Normally I would rely fully on someone else setting it up according to my instructions, but I started being fascinated by the idea of coding it myself or at least understanding what is going on to have a better dialogue with whoever is going to finally set it up.</p>

<p>Is there anyone willing to hear a little more in detail how I am thinking to go about this, maybe set me in the right direction and tell me if there are easier or better ways to achieve it?</p>

<p>I realise my question is hyper-generic, my apologies and thanks for your time!</p>

<p>Girolamo</p>
]]></description>
   </item>
   <item>
      <title>How to use list of x,z positions in .txt file, and translate into marked positions on screen?</title>
      <link>https://forum.processing.org/two/discussion/8131/how-to-use-list-of-x-z-positions-in-txt-file-and-translate-into-marked-positions-on-screen</link>
      <pubDate>Thu, 13 Nov 2014 13:43:58 +0000</pubDate>
      <dc:creator>joanne55</dc:creator>
      <guid isPermaLink="false">8131@/two/discussions</guid>
      <description><![CDATA[<p>Hello!
This is my first attempt at using processing, so I'm sorry if my question is basic.
I am using mouse tracking for two people to communicate secretly. In short, person A and B have the same text document, and A wants to send a message to B, so A uses processing to track the mouse's position over words one after the other to create the secret message, and those x,y positions per word are saved on a .txt. file, which is then sent to B. I already did this part, but struggling with part two: How to then read those x,y values from a .txt on processing, and showcase the position (with a dot or ellipse, whatever) on the screen every time B clicks on 'space' for example, to go from one word to another (to decrypt the message)?</p>

<p>I hope this is clear enough, and thanks in advance!</p>
]]></description>
   </item>
   </channel>
</rss>