Re: Copy image to clipboard
Re: Copy image to clipboard
- Subject: Re: Copy image to clipboard
- From: Nigel Smith <email@hidden>
- Date: Thu, 01 Apr 2004 15:24:05 +0100
On 1/4/04 11:44, "Walter Ian Kaye" <email@hidden> wrote:
>
> tell application "QuickTime Player"
>
> activate
>
> open file (choose file)
>
> copy movie 1
>
> end tell
>
>
>
> ....gives you a picture on the clipboard which FileMaker recognises as a
>
> movie if it is pasted into the container field.
>
>
That doesn't work for me on 10.2.8 -- 'copy' errors.
>
I only have the free version of QT. Do you have the Pro version?
Probably -- I mentioned to Simon privately that that could be the case.
So, we need a way to translate files to something FileMaker can understand,
and a way to break the link FileMaker uses when it puts pictures in
containers.
Image Events will do the first (how stable is Image Events for other
people?), copying and pasting and re-copying through FileMaker in layout
mode will do the second :-)
---------------
set theFile to (choose file)
set filePath to "" & (path to "cusr") & "Desktop:tmpFile.pict"
tell application "Image Events"
set theFile to open theFile
save theFile as PICT in filePath
end tell
tell application "FileMaker Pro"
set theRec to create new record at database "picTest"
set cell "test2" of theRec to file filePath
go to theRec
do script FileMaker script "setField1" of database "picTest"
do menu menu item "Layout Mode" of menu "View"
go to layout "Blank" of database "picTest"
do menu menu item "Paste" of menu "Edit"
do menu menu item "Cut" of menu "Edit"
go to layout "Proper" of database "picTest"
do menu menu item "Layout Mode" of menu "View"
do script FileMaker script "setField2" of database "picTest"
end tell
---------------
Horrible looking code -- I'm trying for extra marks for sneakyness :-)
Nigel
_______________________________________________
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.