Iznogoud Posted April 4, 2007 Posted April 4, 2007 I want to try something if its usefull in real life.I am trying to make a Universal Clipboard so if i copied something to the clipboard i can paste in on a other machine.For an example i made this simple code:FileDelete("D:\Test.txt") $file = FileOpen("D:\Test.txt", 1) $Clipboard=ClipGet() FileWriteLine($file, $Clipboard) FileClose($file)This put the info from the clipboard to a text file and i want to make a script wich reads this text file and put it back to the clipboard or paste it directly.So on one pc i press alt+ctrl+c (hotkey) voor putting it in the text file, somewhere else i press alt+ctrl+v (also a hotkey) and it will paste the content of the text file.So far so good if the text file has only one line, because if you use FileReadLine.ProblemHow can i read multiple lines and put them in the clipboard (ClipPut) like i orginally copied?But how can i
jvanegmond Posted April 4, 2007 Posted April 4, 2007 HotKeySet("^!c", "CopyToFile") HotKeySet("^!v", "CopyFromFile") While 1 Sleep(500) WEnd Func CopyToFile() FileDelete("Clip.txt") FileWrite("Clip.txt", ClipGet() ) EndFunc Func CopyFromFile() ClipPut( FileRead("Clip.txt") ) EndFunc github.com/jvanegmond
Iznogoud Posted April 4, 2007 Author Posted April 4, 2007 I'm almost feeling stupid, because it is so simple if you see this. Sorry that i have not thought about FileRead I will try this, thank you for so far.
jvanegmond Posted April 4, 2007 Posted April 4, 2007 No problem... This is not really complete, so you can have plenty of fun with this. github.com/jvanegmond
Iznogoud Posted April 4, 2007 Author Posted April 4, 2007 (edited) -Very Stupid Post- Solution was to simple :"> Edited April 4, 2007 by Iznogoud
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