Sign in to follow this  
Followers 0
MattX

Clipboard not returning text

3 posts in this topic

Can someone please explain why the contents on the file.dat [ text ] is not being dumped into the mail body ? The only thing I'm getting in the mail body is:

C:\Documents and Settings\user\My Documents\file.dat

When I am looking for the contents.... [ What have I missed ? ]

#include <Inet.au3>
#include <Clipboard.au3>

$s_MailTo = 'matt@address.com'
$s_MailSubject = 'DAT File from ' & @UserName
$ClipBoardFile = @MyDocumentsDir & '\file.dat'
ClipPut(FileRead($ClipBoardFile))
$s_MailBody = $ClipBoardFile

_INetMail ( $s_MailTo, $s_MailSubject, $s_MailBody )

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi MattX,

why arte you using ClipPut at all?

The line: $s_MailBody = $ClipBoardFile

Is the reason why you're getting the path and not the contents.

Try

$s_MailBody = FileRead($ClipBoardFile)

:huh2:

Edited by Hannes123

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

Hi MattX,

why arte you using ClipPut at all?

The line: $s_MailBody = $ClipBoardFile

Is the reason why you're getting the path and not the contents.

Try

$s_MailBody = FileRead($ClipBoardFile)

:huh2:

Thanks - me being stupid..... ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0