title: How can I move a dialog window in Applescript?
body: <p>I've been told that, technically, you can't move a dialog in AppleScript. Amazingly, the following code works.</p>
  
  <p>I'm running a script for InDesign that creates a dialog box. Opening a new AppleScript Editor window and running this code will move the dialog box:</p>
  
  <pre><code>tell application "System Events"
      tell application process "Adobe InDesign CS6"
          set position of window 1 to {1000, 400}
      end tell
  end tell
  </code></pre>
  
  <p>The problem is: I can't figure out a way to incorporate this code directly into my original script -- it just doesn't work, no matter what I try or where I insert it into the code. I have to run it from AppleScript Editor</p>
  
  <p>Any ideas?</p>