title: imacros: submitting textarea form (enter key maybe?)
body: <p><strong>Question:</strong> How to simulate an ENTER (to submit a text in a live chat)?
  (if there is an alternative to using the ENTER key, like using javascript in imacros to trigger an event, that would be great too)</p>
  
  <hr>
  
  <p><strong>Explanation:</strong></p>
  
  <p>I am trying to submit a comment in a live chat that uses a <code>&lt;textarea&gt;</code> element for input. Here is the source code:</p>
  
  <pre><code>&lt;form class="chatbox nolabel"&gt;
      &lt;textarea class="textbox" type="text" size="70" autocomplete="off" name="message" style="resize: none; overflow-y: hidden;"&gt;&lt;/textarea&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have attempted various different approaches of inputting the word "hello" and pressing the ENTER key (so that hello is sent to the users reading), however the only thing I am capable of doing is inputting the word "hello". </p>
  
  <p><strong>Attempt 1:</strong></p>
  
  <pre><code>TAG POS=1 TYPE=TEXTAREA FORM=NAME:NoFormName ATTR=NAME:message CONTENT=hi
  </code></pre>
  
  <p><strong>Results from Attempt 1:</strong>
  When recording, this is the code that appeared when I started typing in the text area, and it successfully places the content into the <code>textarea</code>, however I didn't see any code being recorded when I press the ENTER key, so I assume that is the issue in this case.</p>
  
  <p><strong>Attempt 2:</strong> (event recording mode)</p>
  
  <pre><code>EVENTS TYPE=KEYPRESS SELECTOR="HTML&gt;BODY&gt;DIV:nth-of-type(2)&gt;DIV&gt;DIV&gt;DIV&gt;DIV&gt;DIV&gt;DIV:nth-of-type(2)&gt;FORM&gt;TEXTAREA:nth-of-type(2)" CHARS="hi"
  WAIT SECONDS=1
  EVENT TYPE=KEYPRESS SELECTOR="HTML&gt;BODY&gt;DIV:nth-of-type(2)&gt;DIV&gt;DIV&gt;DIV&gt;DIV&gt;DIV&gt;DIV:nth-of-type(2)&gt;FORM&gt;TEXTAREA:nth-of-type(2)" KEY=13
  </code></pre>
  
  <p><strong>Results from Attempt 1:</strong>
  In this case, I tried using the Keypress type with events to simulate hitting the ENTER key, however what resulted was getting a "hi(newline)".</p>
  
  <p>Any ideas?</p>