title: How can I launch an applescript.scpt file from the terminal and pass terms / variables?
body: <p>I have an applescript that does something along these lines:</p>
  
  <pre><code>using terms from application "Quicksilver"
      on open theseitems
          repeat with aitem in theseitems
              display dialog aitem as text
          end repeat
      end open
  end using terms from
  </code></pre>
  
  <p>But what I'd like to do is be able to start running a particular <code>applescript.scpt</code> file via the Terminal and pass in a variable, like a path to a file.</p>
  
  <pre><code>osascript ~/applescript.scpt /path/to/my/file.txt
  </code></pre>
  
  <p>and then have the Applescript run with access to that parameter. In this case it would (hopefully) display a dialog with that path, <code>/path/to/my/file.txt</code></p>
  
  <p>I know I could achieve that by doing something like</p>
  
  <pre><code>osascript -e "display dialog "~/path/to/file.txt"
  </code></pre>
  
  <p>But the point is not to display a dialog with Applescript, rather it's more about knowing if I would be able to pass a variable in to a script file.</p>