Re: Q: GraphicsConverter Paste At (format for position?)
Re: Q: GraphicsConverter Paste At (format for position?)
- Subject: Re: Q: GraphicsConverter Paste At (format for position?)
- From: Mr Tea <email@hidden>
- Date: Wed, 01 Feb 2006 01:33:38 +0000
This from Marc Glasgow - dated 31/1/06 12.23:
> I'm trying to get GraphicConverter to paste an image from the
> clipboard into a specific location in an existing window.
You can to do this:
tell application "GraphicConverter"
activate
tell window 1
paste at {20, 20}
end tell
end tell
...but the current release of GC uses the centre of the selection as the
reference point for pasting, rather than the top left corner. If you know
the size of the item you're pasting, you can factor that into your script,
otherwise, here's a typically Heath-Robinson workaround:
set {px, py} to {25, 25} -- (substitute your chosen paste co-ordinates)
tell application "GraphicConverter"
activate
tell window 1
paste
set {x1, y1, x2, y2} to get selection
undo
set {w, h} to {round ((x2 - x1) / 2), round ((y2 - y1) / 2)}
paste at {px + w, py + h}
end tell
end tell
HTH
Nick
pp Mr Tea
--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden