Re: Copy image to clipboard
Re: Copy image to clipboard
- Subject: Re: Copy image to clipboard
- From: Simon Forster <email@hidden>
- Date: Thu, 1 Apr 2004 18:40:44 +0100
Many thanks for this - much neater than opening in Safari, emulating
command-c; command-w; etc. No more windows flying all over the place!
Simon Forster
_____________________________________________________
LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
Tel: +44 (0)70 9230 5244 Fax: +44 (0)70 9230 5247
_____________________________________________________
On 1 Apr 2004, at 15:34, Hanaan Rosenthal wrote:
This finally takes the file (I believe any major format should work)
and puts it in the clipboard.
set imageFilePath to "path:to:image_name.gif"
set pictFilePath to "path:to:tmp.pict"
tell application "Image Events"
set theImage to open file imageFilePath
tell theImage
save as PICT in pictFilePath
end tell
end tell
set fdata to read file pictFilePath as picture from 513
set the clipboard to fdata
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.