title: AppleScript get variable from a specific column in a TSV file
body: <p>I am new when it comes to using AppleScript, and I need you help with the following:</p>
  
  <p>I have a TSV file formatted like this:</p>
  
  <pre><code>       [COLUMN A] [COLUMN B] [COLUMN C] [COLUMN D] (...)
  [Line 1]Data      Data       Data       Data
  [Line 2]Data      Data       Data       Data
  (...)
  </code></pre>
  
  <p>I would like, for each line of the file, to perform a new Google Image search. The keywords would be taken from let's say column A and D, but not from column B or C.</p>
  
  <p>I managed to create a script that opens the file, and performs the search, so my problem is "only" to be able to use some specific columns, not all of them (which is what I am doing with my current script). </p>
  
  <p>Here is my script:</p>
  
  <pre><code>set thetext to read (choose file) 
  repeat with line_number from 1 to count of paragraphs in thetext 
      set line_text to paragraph line_number of thetext 
  
      tell application "Google Chrome" 
          activate
          tell front window to make new tab at after (get active tab) with properties {URL:"http://images.google.com/images?ie=ISO-8859-1&amp;hl=en&amp;btnG=Google+Search&amp;q=" &amp; line_text}
      end tell
  end repeat
  </code></pre>
  
  <p>How would you do to "split the line" (line_text in the script) and use only specific columns for the search ? It is a TSV file so it uses tabulations between the columns of data. </p>
  
  <p>Thank you :)</p>