AutoHotkey Community

It is currently May 26th, 2012, 10:58 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Linux-like clipboard
PostPosted: February 3rd, 2005, 2:51 pm 
hi,
i'm using both windows and linux

under linux you can copy a text by marking the text and middle-clicking where you whish to copy to

is that possible to do with autohotkey? :?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 3:14 pm 
Yes. Create a GUI/ContextMenu which will be triggered via the MidMouseButton and select an assigned target.

Have fun.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 3:22 pm 
paste by mButton is no problem

the problem is to copy while marking the text


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 3:27 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
I'm working on a concept right now which I think could work. Hold in there! 8)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 3:33 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Since the previously selected text should still be selected when you middle-click, maybe something simple:

MButton::
Clipboard = ; Must start off blank for detection to work.
Send ^c
ClipWait, 1
Send {LButton}^v ; The left click moves the caret to the cursor's position.
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 3:39 pm 
sry,

i don't understand,
but as i said, MButton is no problem:

Code:
~MButton::
   tmp = %clipboard%
   clipboard = %word%
   send, ^v
   clipboard = %tmp%
return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 3:42 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Code:
~LButton::
If A_Cursor = IBeam
{
   GetKeyState,Ctrl,Control
   If Ctrl = D
   return
   MouseGetPos,X1,Y1
   KeyWait,LButton
   MouseGetPos,X2,Y2
   If (X1 <> X2 or Y1 <> Y2)
   Send,^c
}
return


Only problem is, it gets annoying after a while, so I changed "If Ctrl = D" to "If Ctrl = U" in my version. About the middle click? Didn't think you needed help on that, and Chris has it covered anyway. I wouldn't use it. :?

Thanks for the idea, I might actually use this myself!

Edit: Whoa... this is post #666. :shock: :twisted: Maybe I'm destined to have bad luck with this script. :lol: Except that it kinda... um... works. :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 3:48 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I think I understand this better now. The goal is to copy text immediately to the clipboard after the user stops dragging so that even if the user switches to an entirely different window, the middle-click will still paste the text. Thanks for the solution, Jonny.

jonny wrote:
Horror has a name
The GGW! Eeek!
That's great because it sounds like a movie tagline.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2005, 3:53 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Actually, that line is from a link button on an Oktolon website that BoBo recently pointed me to. Yes, Oktolon is the GGW's real name, and yes, there is actually a website devoted to it.

Has anyone else noticed how quickly this topic is getting posts?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2005, 2:12 pm 
Offline

Joined: February 3rd, 2005, 3:40 pm
Posts: 1
yes 8)

thank you


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 18th, 2005, 1:50 pm 
don't know if this helps, but a Firefox extension does part of the linux way, which copies all highlighted text in the browser to the clipboard without having to right click > copy. It's called Auto Copy. I know it's not the same language but maybe give you some ideas. A very handy extension if your use to linux but have to use windows.


Report this post
Top
  
Reply with quote  
PostPosted: May 5th, 2005, 11:13 pm 
Offline

Joined: July 9th, 2004, 3:52 am
Posts: 3
See these threads:

http://www.autohotkey.com/forum/viewtopic.php?t=463

and

http://www.autohotkey.com/forum/viewtopic.php?t=3079


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 10th, 2007, 2:58 pm 
Hello,
I use this as part of my Script, it's a wonderful function.
But I can copy text in several ways, not only "lbutton down, drag, lbutton up"
but also with a double click on a word, or with Shift + two mouse clicks at begin and end of the text to copy.
Has anyone an idea, how to send ^c in these cases, too?
nora


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: [VxE], iBob35555VR, Klark92 and 63 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group