1

I have a bunch of applescript files I need to run but some that were running yesterday are not running today. Applescript is showing me this beautiful message.

enter image description here

When this message is shown, console shows this message: 04/06/14 11:32:44,079 xpcd[324]: Info.plist does not contain an XPCService dictionary: /System/Library/Frameworks/Security.framework/XPCServices/SecurityAgent.xpc

The problem is probably with applescript editor, because I have restored several copies of the script with different dates and none opens. Some other scripts open, but not this.

Is there a way t extract the contents of this file to a TXT so I can try to recreate the script?

thanks

NOTE: I have verified now that the scripts are not corrupted by running them from command line using osascript.

1

You cannot open a .scpt file with any editor! It is a compiled version of the script, not text, and it will not open with any editor.

Case in point, here is what happens when I try to view the file in Terminal...

Viewing compiled applescript

OSX comes with osadecompile that will extract the source code of a compiled script .scpt file.

Here is an example...

$ osadecompile args2.scpt 
on run argv
    set argc to 0
    try
        set argc to (count of argv)
    end try
    display dialog ("Argument Count: " & argc as string)
end run
  • That's a good tool to know about. However, this will not work with run-only compiled apps. Also, if apps aren't saved as run-only they will open right into the editor anyway. – MiB Jul 25 '15 at 8:48
  • TextMate is able to open .scpt files – pkamb Oct 23 '18 at 20:43

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.