Paste from clipboard to Mail

Hello,
I hope I am asking my question in the right forum, if not please excuse my ignorance, this is my first time in Macscripter world and I am not very familiar with forums in general.

Here is my problem. I would like to add an applescript command in a filemaker script in order to be able to copy an image into Mail.
The process is convert a record into preview, copy preview then paste the result (which takes the form of a pdf) into the body of a mail message (into Apple Mail).

I have tried the following script : tell application “System Events” to keystroke “V” using {command down}
It works the first time but if I repeat the script it does not work anymore.
It looks like if the script would not find the image anymore but the image still exist in the clipboard.

I have looked everywhere on the net I do not see anything that talk about a script allowing paste from clipboard into another application. I thought this would be an easy script to find but apparently not or I don’t know how to look.

Anyway. I thank you in advance for any help you may give me.
Didierdes

Model: Macbook 13"
AppleScript: 2.2.1
Browser: Firefox 3.5.2
Operating System: Mac OS X (10.5)

Moved the topic to the appropriate forum :slight_smile:

Well, I can just assume you might have forgotten to ativate apple mail somehow or maybe a little delay between every command might help (

delay 2

)
No code, no idea :confused:

Hello,

Yep, I did forget to do that, thanks a lot for the tip. I used the following code and it’s working :

tell application "Mail" 
activate
end tell
tell application "System Events" to keystroke "v" using {command down}

Thanks again
:smiley:

Model: Macbook 13"
AppleScript: 2.2.1
Browser: Firefox 3.5.2
Operating System: Mac OS X (10.5)