Make unscriptable applications scriptable?

Is it possible to make unscriptable applications scriptable with raw apple events?

It would be great for Preview because that is not scriptable in anyway! You can’t even close a window on Preview with Applescript.


GUI scripting works, of course:

tell application "System Events"
	tell process "Preview"
		set W to windows -- list of all open windows by titile
		click (button 1 of (item 1 of W)) -- button 1 is the close button
	end tell
end tell

Is there a way to do the opposite? ie make a scriptable application NOT scriptable?

Or really just delete it from AppleScript’s Dictionary search?

Because I made tons of AppleScript Studio Apps that I forgot to uncheck “isScriptable” or whatever it’s called, and I’m not exactly sure where some of the files are… :rolleyes:

So now they’re cluttering up my Dictionary, and it’s very hard to find what I want.


Open the main info.plist in the package contents of your application with Property List Editor and uncheck Scriptable (or delete it)

Hope it helps,

I know that much, but is their an easier way? Some already-made, automated way? I could make my own, I suppose…

See, I’m very unorganized on this particular computer, and I have files everywhere. It would be kinda annoying to have to do that with EVERY SINGLE program I’ve ever written…


Now Preview won’t open! I can’t open a document from Finder! Can someone ZIP Preview for me and send it to me?

Nevermind, I repaired the permissions.

I changed Preview’s defaults as detailed above and Preview wouldn’t launch, so I tried chmod 777 and no luck. Disk Utilities permissions repair didn’t work either. What did you do to fix Preview?



Disk Utilities’ Repair permissions.