Rskm Posted September 26, 2019 Share Posted September 26, 2019 Hi, i have copied a file to memory using CTRL+C. now, i wish to copy this file to a folder which is user input. How do i access the file in the memory? Basically, what i expect the script to do is as follows. 1. i perform single click on a file on file in a particular folder, say 'new_folder' 2. when i run the autoit script, it activates the 'new_folder' and then performs CTRL+C, which will by default copy the file to memory as i have clicked it before running the script 3. in the next step, this file should be copied to a different location. appreciate any idea on this. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted September 27, 2019 Share Posted September 27, 2019 @Rskm Couldn't you use FileCopy() function? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Rskm Posted September 27, 2019 Author Share Posted September 27, 2019 Hi, to use filecopy(), i should have the file name. I am going to implement this to outlook, where i click the email in the outlook(wont open it as i do a single click) perform ctrl+c to copy it to memory, then run the script to save this email to a user specified location... thanks Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted September 27, 2019 Share Posted September 27, 2019 @Rskm Use Outlook UDF to perform such actions Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Rskm Posted September 27, 2019 Author Share Posted September 27, 2019 thanks FrancescoDiMuro on that guidance. i am not an expert with Autoit.. Is this UDF set of purpose built commands for specific application ? is it that i should download it from above link to get those commands work in my script ? thanks again Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted September 27, 2019 Share Posted September 27, 2019 @Rskm That UDF is used to interact with Outlook, as the name suggests, and you can do almost whatever you want. You can create email, read email, send email, move email, and many (really many!) other things. To get started with the UDF, download it from here, where you can find both the UDF and some examples Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Rskm Posted September 28, 2019 Author Share Posted September 28, 2019 Hello Francesco, I find a script/example from the outlook pdf which looks like close to what i need...its _OL_ItemSave.. But i cannot really follow the meaning of the $oOL. How do i inform the script that the mail to save is the one that i just clicked with mouse in my outlook window... thansk for your support again. Link to comment Share on other sites More sharing options...
Rskm Posted September 28, 2019 Author Share Posted September 28, 2019 (edited) i type the following in my script. Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended) Global $Result = _OL_TestEnvironmentCreate($oOutlook) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF - Manage Test Environment", "Error creating the test environment. @error = " & @error) i get second error msg (ie; manage test env). the error msg reads <quote> Error creating the test environment. @error=509 </unquote>... have copied the library to 'include'......any guidance is appreciated.. i Edited September 28, 2019 by Rskm correction Link to comment Share on other sites More sharing options...
Rskm Posted September 28, 2019 Author Share Posted September 28, 2019 ok, i solved it without UDF.. i just have to give a 'F12' while on outlook, this will open the save box and rest is straight forward. thanks 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