Re: Image Events and Preview
Re: Image Events and Preview
- Subject: Re: Image Events and Preview
- From: DeNigris Sean <email@hidden>
- Date: Sun, 14 Feb 2010 10:56:32 -0500
I have a script that creates JPEGs. I wanted to display them to the user in Preview, but discovered that Preview isn't scriptable(!)
<snip>
And it would seem logical that Image Events must be using something like Apple Events to tell Preview to open the files. Now, if that's the case, then why the heck isn't Preview directly scriptable?
Even though Preview doesn't advertise scriptability, it at least responds to events needed by GUI applications in Mac OS X, including open... From http://developer.apple.com/mac/library/documentation/AppleScript/Conceptual/AppleScriptX/Concepts/osa.html:
Apple Events Sent by the Mac OS
The Mac OS takes advantage of Apple events to communicate with applications, such as to notify an application that it has been launched or should open or print a list of documents. Applications that present a graphical user interface must be able to respond to whichever of these events make sense for the application. For example, all such applications can be launched and quit, but some may not be able to open or print documents. So you can just say: tell application "Preview" to open POSIX file "/path/to/file.jpg"
Sean DeNigris
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden