Jump to content

Advanced copy and paste


EvAsion
 Share

Recommended Posts

I have 2 computers and i'm always browsing the internet. I often want to copy strings of text between computers.. but it means copying it to some text file or some crap.. well i simplified that into this simple script that allows you to copy highlighted text (or if nothing is highlighted whatever text is in clipboard) onto your removable disk. Then just plug it into your other computer hit Ctrl+shift+v and whatever you copied on the other computer = pasted on the new computer YAY

Ctrl + Shift + C to copy

Ctrl + Shift + V to paste

p.s. Added Getdrivebyname() don't know if it already exists

HotkeySet("^+c","AdvCopy")
HotkeySet("^+v","AdvPaste")

Global $filename = "AdvCopyPaste"

Func GetDriveFromName($dname);dname = name of the drive
$drive = DriveGetDrive( "removable" )
    For $i = 1 to $drive[0]
        If DriveGetLabel($drive[$i]) = $dname Then
            $drive[$i] = $TrueDrive
        EndIf
    Next
EndFunc

Func AdvCopy()
    Send("^c")
    GetDriveFromName("My USB")
    $text = ClipGet()
    FileDelete($TrueDrive&"\"&$filename&".txt")
    FileWrite($TrueDrive&"\"&$filename&".txt",$text)
    TrayTip("", "Copied..", 5)
    sleep(3000)
    TrayTip("","",0)
EndFunc

Func AdvPaste()
    GetDriveFromName("My USB")
    $paste = FileRead($TrueDrive&"\"&$filename&".txt")
    ClipPut($paste)
    Send("^v")
    TrayTip("", "Pasted..", 5)
    sleep(3000)
    TrayTip("","",0)
EndFunc


While 1
    sleep(1000)
WEnd
Edited by EvAsion
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...