Jump to content

Clipboard not returning text


Recommended Posts

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 )
Link to comment
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:

Edited by Hannes123
Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Link to comment
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..... ;)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...