Universal Clipboard

Post your working scripts, libraries and tools
A random guy
Posts: 31
Joined: 10 Feb 2017, 19:55

Universal Clipboard

07 Dec 2017, 17:40

Just a simple script that shares your clipboard with other computers using a ftp server.
To setup you must have a folder (on the ftp server) called "UniClip" with a txt file called "clips.txt" inside it.
Then edit the script to match your Ftp settings.
Press Ctrl+Win+C for copying to universal clipboard.
Press Ctrl+Win+V for pasting from universal clipboard.
As always, i'm not responsible for any damage. Use at your own risk.

Code: Select all

FtpIp := "" ;Ip of ftp server
FtpUser := "" ; Username
FtpPass := "" ;password
Path := A_ScriptDir ;path for program files
OldClip := ;Used to serperate Universal Clipboard from Local Clipboard (Don't change)

If !fileexist("%Path%\clips.txt")
FileAppend, , %Path%\clips.txt
If !fileexist("%Path%\cmd.txt")
FileAppend, open %FtpIp%`n%FtpUser%`n%FtpPass%`ncd Uniclip`nget clips.txt`nbye, %Path%\cmd.txt
If !fileexist("%Path%\cmd2.txt")
FileAppend,open %FtpIp%`n%FtpUser%`n%FtpPass%`ncd Uniclip`ndelete clips.txt`nappend clips.txt clips.txt`nbye , %Path%\cmd2.txt

OldClip := Clipboard
Sendinput ^c
Filedelete, %Path%\clips.txt
FileAppend, %ClipboardAll%, %Path%\clips.txt
runwait, %comspec% /k cd %Path% & ftp -s:cmd2.txt & exit, , hide
Clipboard := OldClip

OldClip := Clipboard
runwait, %comspec% /k cd %Path% & ftp -s:cmd.txt & exit, , hide
FileRead, Clipboard, *c %Path%\clips.txt
Sendinput ^v
Clipboard := OldClip

Improvements to make:
Make it work without a ftp server.
Make it cross platform with android, ios, etc (My main objective).
Make it work when copying files from Windows Explorer.
Make the clipboard encrypted.
Other minor stuff (like having it start when windows boots automatically).

Return to “Scripts and Functions”

Who is online

Users browsing this forum: digidings and 72 guests