My script is as simple as
tell application id "com.apple.dt.Xcode"
tell (make new text document with properties {path:path to documents folder as string})
set contents to script_item's script_text
set visible of the front window to true
end tell
end tell
script_text is defined but omitted here for the sake of brevity.
AppleScript returns error
Xcode 4.6.3 got an error: Can’t make or move that element into that container, number -10024
What’s happening here?
According to the Xcode AppleScript dictionary, I should be able to perform such a simple task.