title: Tera Term Scripting, need help developing a macro
body: <p>I am using a Tera Term over a serial port to do some testing on a board. Recently I found out I can do some scripting in Tera Term so I have been doing research to help automate and make testing a little easier. </p>
  
  <p>I know Tera Term has a site that lists example macros as well as a command list but I guess what I need is someone with experience scripting in Tera Term.</p>
  
  <p>Tera Term uses a sort of Basic language called Tera Term Language (TTL) but I found it hard from the site to actually identify which commands I needed to use.</p>
  
  <p>Tera term site: <a href="http://ttssh2.sourceforge.jp/">http://ttssh2.sourceforge.jp/</a> &lt; -- <strong>Note: Site is in Japanese but I always have it auto translated...</strong></p>
  
  <p>I am trying to develop a script to play a set of tracks using a "play x" command, where x is the track index. Ideally the track will play for ~3 seconds and then increment up to the next track. I have a very crude outline algorithm that I should describe it.</p>
  
  <p>Algorithm:</p>
  
  <blockquote>
  <pre><code>;start
  
  ;input to take in number of track to test n tracks
  ;input is stored in "n"
  i=0
  
  do while i &lt; (n+1)
  
  ;play track i for 3 seconds
  
  i++
  
  end  while
  
  ;stop
  </code></pre>
  </blockquote>
  
  <p>If anyone has any insights or experience with Tera term I would be very appreciative.</p>
  
  <p><strong>If anything right now I need to figure out how to take an inputbox input and store it to a variable.</strong> I can probably figure out the rest...</p>
  
  <p>Thanks</p>