EvAsion Posted June 30, 2007 Posted June 30, 2007 (edited) 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 expandcollapse popupHotkeySet("^+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 June 30, 2007 by EvAsion |-- Periodic Table --||-- Dynamic Class Timetable --||-- Navigation in Counter-Strike --|
jvanegmond Posted June 30, 2007 Posted June 30, 2007 Why do you "GetDriveByName" each time something has to be pasted while you keep $Truedrive as a Global? This confuses me. github.com/jvanegmond
EvAsion Posted June 30, 2007 Author Posted June 30, 2007 Why do you "GetDriveByName" each time something has to be pasted while you keep $Truedrive as a Global? This confuses me.Because i'm noob to autoit. |-- Periodic Table --||-- Dynamic Class Timetable --||-- Navigation in Counter-Strike --|
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