• 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: Gui script for Preview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gui script for Preview


  • Subject: Re: Gui script for Preview
  • From: Christopher Stone <email@hidden>
  • Date: Sat, 05 May 2012 18:15:29 -0500

On May 05, 2012, at 07:48, Robert Poland wrote:
Has anyone gotten this to work? I get the error "Can't make some data into the expected type".
______________________________________________________________________

Hey Bob,

I had to make the destination path a posix path.

--
Best Regards,
Chris

set f to alias "Thor:Users:chris:Downloads:001.jpg"
tell application "Finder" to set newf to ("" & (f's parent) & "f_Resized.jpg")
set newf to POSIX path of newf

set factor to 0.5
set {x, y} to (image info for f)'s {pixel width, pixel height}
set w to make new graphic window with properties {pagewidth:x * factor, pageheight:y * factor}
BeginFigure(w)
DrawImage(f, {0, 0, x * factor, y * factor}, "")
EndFigure()
save w in newf
delete w


 _______________________________________________
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

References: 
 >Gui script for Preview (From: Alex Zavatone <email@hidden>)
 >Re: Gui script for Preview (From: Emmanuel LEVY <email@hidden>)
 >Re: Gui script for Preview (From: Christopher Stone <email@hidden>)
 >Re: Gui script for Preview (From: Emmanuel LEVY <email@hidden>)
 >Re: Gui script for Preview (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Cannot open "On My Mac" mailboxes
  • Next by Date: Re: Cannot open "On My Mac" mailboxes
  • Previous by thread: Re: Gui script for Preview
  • Next by thread: Re: Gui script for Preview
  • Index(es):
    • Date
    • Thread