MonoNexo Posted December 28, 2007 Share Posted December 28, 2007 Hi all, I'm trying to figure out some way to pass by reference the location of a file such that if pasted into Outlook, it'll treat it as a file attachment. I've tried just putting the location of the file into the clipboard, but that doesn't work (using clipPut()). I'm pasting using Send("^v"); I realize that clipPut is just putting a string of text. I scoured the documentation for something that would actually put a reference to the file. Any help is appreciated! Thanks, Matt Link to comment Share on other sites More sharing options...
martin Posted December 28, 2007 Share Posted December 28, 2007 Hi all,I'm trying to figure out some way to pass by reference the location of a file such that if pasted into Outlook, it'll treat it as a file attachment.I've tried just putting the location of the file into the clipboard, but that doesn't work (using clipPut()). I'm pasting using Send("^v");I realize that clipPut is just putting a string of text. I scoured the documentation for something that would actually put a reference to the file.Any help is appreciated!Thanks,MattWelcome to the forums I'm not sure what you mean I'm afraid. If you want to add a file as an attachment in Outlook then why do you paste it? I'm obviously missing something. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
MonoNexo Posted December 28, 2007 Author Share Posted December 28, 2007 Welcome to the forums I'm not sure what you mean I'm afraid. If you want to add a file as an attachment in Outlook then why do you paste it? I'm obviously missing something.I'm trying to automate it without using the mouse. I'm thinking something along the lines of:clipPutFile("C:/data.png");Send("^v");in the body field of the email, which in Outlooks case, will attach "C:/data.png" to the email.If you use:clipPut("C:/data.png");Send("^v");Because that's putting a string of text and not treating it like a file reference, Outlook will put "C:/data.png" as part of the message body, not an attachment.Hope that helps explain...Matt Link to comment Share on other sites More sharing options...
martin Posted December 28, 2007 Share Posted December 28, 2007 I'm trying to automate it without using the mouse. I'm thinking something along the lines of: clipPutFile("C:/data.png"); Send("^v"); in the body field of the email, which in Outlooks case, will attach "C:/data.png" to the email. If you use: clipPut("C:/data.png"); Send("^v"); Because that's putting a string of text and not treating it like a file reference, Outlook will put "C:/data.png" as part of the message body, not an attachment. Hope that helps explain... Matt I think I see. You want something that would act like the imaginary ClipPutFile? Then you could try this; I haven't and I have no idea if it will work. $text = Fileread("C:\data.png"); Clipput($text) Send("^V") I'd be interested to know if it does work though. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 28, 2007 Share Posted December 28, 2007 Hay Matt Go An MSG? If So Add (maxell225@hotmail.com) And I Can Help You I Think O.o Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
MonoNexo Posted December 28, 2007 Author Share Posted December 28, 2007 Woot! Special thanks to John O. for pointing out that infact, clipPutFile() exists! I had to upgrade to the newest version of autoit, but sure enough, it works like a charm. Example: #include "misc.au3" _ClipPutFile('C:/5.jpg') Thanks all! Matt Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 28, 2007 Share Posted December 28, 2007 I'm Glad I Could Help You Matt --John O. Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
martin Posted December 28, 2007 Share Posted December 28, 2007 I'm Glad I Could Help You Matt --John O.Thanks from me too, I'd never noticed that function. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now