Re: Gui script for Preview
Re: Gui script for Preview
- Subject: Re: Gui script for Preview
- From: KOENIG Yvan <email@hidden>
- Date: Sat, 05 May 2012 15:11:35 +0200
Le 5 mai 2012 à 14:48, Robert Poland <email@hidden> a écrit :
> Has anyone gotten this to work? I get the error "Can't make some data into the expected type".
>
> set factor to 0.5
> set f to "Desktop:chart1.gif"
> set newf to "Desktop:Scans ƒ"
> 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 newt
>
(1) I'm not sure that
> "Desktop:chart1.gif"
is a valid reference to the file.
An HFS path starts from the volume name so the path would be :
<startupVolume>:Users:<userAccount>: Desktop:chart1.gif
(2) I'm not sure that image for info accepts a string as a valid reference. I guess that a file or an alias would be better.
Yvan KOENIG (VALLAURIS, France) samedi 5 mai 2012 15:11:30
_______________________________________________
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