Jump to content

Easy Copy/Paste


fmen
 Share

Recommended Posts

; Press Esc to terminate script, F8 or Middle Click to "Copy/Paste"

Global $Paused = 0
#include <Misc.au3>
Opt("TrayIconDebug", 1) 

HotKeySet("{F8}", "TogCopyPaste")
HotKeySet("{ESC}", "Terminate")

;;;; Body of program would go here ;;;;
While 1
    Sleep(100)
    If _IsPressed('04') = 1 Then Call ("TogCopyPaste")
 Switch $Paused
  Case 1
   Send ("^c")
   $Paused = 3
  Case 2
   ToolTip("")
   Send (ClipGet())
   $Paused = 0
  Case 3
   ToolTip('Copied',0,0)
 EndSwitch
WEnd
;;;;;;;;

Func TogCopyPaste()
 Switch $Paused
  Case 0
   $Paused = 1
  Case 1
   $Paused = 3
  Case 3
   $Paused = 2
 EndSwitch
EndFunc

Func Terminate()
    Exit 0
EndFunc

With the help of others on this board, this is what I've come up with.

Highlight any text from any application and click the middle mouse button to copy.

Click again and script toggles function so that text will be pasted.

Neat or what?

Link to comment
Share on other sites

While the code looks correct to me, there are issues with this macro. Example: I copy your function

Func TogCopyPaste()
 Switch $Paused
  Case 0
   $Paused = 1
  Case 1
   $Paused = 3
  Case 3
   $Paused = 2
 EndSwitch
EndFuncoÝ÷ Ùhbr(ë(º×âæî¶'ÈÚrF§v·¢ÚZ²×¢µ«­¢+ÙMÝ¥Ñ ÀÌØíAÕÍ
ÍÀ($ÀÌØíAÕÍôÄ(
ÍÄ($ÀÌØíAÕÍôÌ($
ÍÌ($$ÀÌØíAÕÍôÈ($$$¹Mݥѡ¹Õ¹oÝ÷ Ø   ÝjÇ¢wmgºÚ"µÍBBH[ÈÙÐÛÜTÝJ
BBBHÝÚ]Ú ÌÍÔ]ÙYØÙHBBBBBBBH ÌÍÔ]ÙYHBBBBBBBBHØÙHBBBBBBBBBBBBBBH    ÌÍÔ]ÙYHÂBBBBBBBBBBBBBPØÙHÂBBBBBBBBBBBBBBBBBBBBH ÌÍÔ]ÙYHBBBBBBBBBBBBBBBBBBBBBBBBBBH[ÝÚ]Ú[[

I first noticed the error when I had copied and entry in notepad

iand

and was just fooling around clicking the middle mouse button repeatedly.

andiandiandiandiandiandiandiandiandandianandiandianandiandiand

If you notice it doesn't always put the entire entry. Could this be a bug with the Send(GetClip())?

Overall I like the concept though.

Edited by JaySquared

Aha.. I have unlocked it's secrets.. world domination is within my grasp...

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...