• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Image Events and Preview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image Events and Preview


  • Subject: Re: Image Events and Preview
  • From: Martin Michel <email@hidden>
  • Date: Sat, 13 Feb 2010 19:05:02 +0100

Hi Rob,

I cannot tell you why Preview isn't scriptable, but can tell you how to open JPG files with it:

set jpgfilepath to "Macintosh HD:Users:martin:Desktop:test.jpg"
set qtdjpgfilepath to quoted form of POSIX path of jpgfilepath

set command to "open -a Preview.app " & qtdjpgfilepath
do shell script command

Hope that helps!

Best regards from snowy Berlin,

Martin


Am 13.02.2010 um 17:58 schrieb Rob Lewis:

> I have a script that creates JPEGs. I wanted to display them to the user in Preview, but discovered that Preview isn't scriptable(!)
>
> On a lark, I tried telling Image Events to open the files. It works, but…the files actually open in Preview!
>
> While this is nice, I'm worried that as a long-term solution it might be a bit fragile.
>
> 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?
>

 _______________________________________________
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

  • Follow-Ups:
    • Re: Image Events and Preview
      • From: Alex Zavatone <email@hidden>
    • Re: Image Events and Preview
      • From: Michelle Steiner <email@hidden>
References: 
 >Image Events and Preview (From: Rob Lewis <email@hidden>)

  • Prev by Date: Image Events and Preview
  • Next by Date: Re: Image Events and Preview
  • Previous by thread: Image Events and Preview
  • Next by thread: Re: Image Events and Preview
  • Index(es):
    • Date
    • Thread