AutoHotkey Community

It is currently May 24th, 2012, 6:51 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: February 24th, 2007, 2:55 am 
Offline

Joined: September 12th, 2005, 10:35 pm
Posts: 216
I want to copy some text automatically when the selected test is leftmouse released.


for example, for the following sentence:---

The trial in the murder case is all set to begin from tomorrow

I select the whole sentence and then when i reach at the end of "tomorrow",
i release the left mouse button . I want a script such that the selected portion is automatically copied to the clipboard when i release the left mouse button.

Any script for this? :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 24th, 2007, 3:14 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
here


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 24th, 2007, 3:58 am 
Offline

Joined: September 12th, 2005, 10:35 pm
Posts: 216
Hi I read that post and found it hard to realize.

Can you simply a bit?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 24th, 2007, 4:13 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
Code:
~LButton::
   MouseGetPos x0, y0            ; save start mouse position
   KeyWait LButton
   MouseGetPos x, y              ; position when button released
   If (abs(x-x0) > 5 or abs(y-y0) > 5) {
      clip0 := ClipBoardAll      ; save old clipboard
      ClipBoard =
      Send ^c                    ; selection -> clipboard
      ClipWait 2, 1              ; restore clipboard if no data
      If ErrorLevel
         ClipBoard := clip0
   }
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 24th, 2007, 7:45 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Nice Laszlo.

_________________
Autohotkey Just drives me crazy ..


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, janopn, Kirtman, Klark92, kwfine, Yahoo [Bot] and 75 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