title: Passing variables to an AppleScript
body: <p>The code to run my AppleScript in Xcode is the following:</p>
  
  <pre><code>NSString *path = [[NSBundle mainBundle] pathForResource:@"Script" ofType:@"scpt"];
  
  NSAppleScript *script = [[NSAppleScript alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:nil];
  
  [script executeAndReturnError:nil];
  </code></pre>
  
  <p>Before executing it, I was wondering if it was possible to set some variables up for it to use. In other words, I want to pass variables from my app to an AppleScript.</p>