Guest dubrave Posted February 11, 2005 Posted February 11, 2005 Hi ppl. Love Autoit, congrats, very strait forward and powerful. I have a problem, but... I am trying to copy the content of a .txt file to the clipboard. Using ClipPut, I only manage to push one line at a time, so the result is the last line of text being left in the clipboard. Is there a way to copy the file content without opening it??? Any help would be appreciated. Dubrave
jpm Posted February 11, 2005 Posted February 11, 2005 Hi ppl.Love Autoit, congrats, very strait forward and powerful.I have a problem, but...I am trying to copy the content of a .txt file to the clipboard.Using ClipPut, I only manage to push one line at a time, so the result is the last line of text being left in the clipboard.Is there a way to copy the file content without opening it???Any help would be appreciated.Dubrave<{POST_SNAPBACK}>clipPut("line1" & @lf & "line2") orclipPut("line1" & @crlf & "line2")is not working for you?
Blue_Drache Posted February 11, 2005 Posted February 11, 2005 clipPut("line1" & @lf & "line2") orclipPut("line1" & @crlf & "line2")is not working for you?<{POST_SNAPBACK}>I prefer arrays and the like for file operations.#include <file.au3> Dim $file,$filearray,$x,$line $file = FileOpen(C:\blah.txt,0) If @error = -1 then exit _FileReadToArray($file,$filearray) For $x = 1 to $filearray[0] $line = $line & @CRLF & $filearray[$x] Next ClipPut($line) Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
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