3

I have tried to do

tell application "Script Editor"
    make new script with properties {name:"this is a test", body:"and 
    more text"}
end tell

but it came up with the error

'error "Script Editor got an error: Can’t make class file." number -2710 from file to class"

  • Does Script Editor support a class named script? – nohillside Mar 11 '18 at 8:23
3

This works for me:

tell application "Script Editor"
    make new document with properties {name:"this is a test", contents:"and 
more text"}
end tell
-1

I think you need to change the "Script Editor to a different application

tell application "Script Editor"
    make new script with properties {name:"this is a test", body:"and 
    more text"}
end tell

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .