Jump to content


Doubleclicking text being sent to clipboard


  • Please log in to reply
5 replies to this topic

#1 Guest Today

Guest Today
  • Guests

Posted 28 February 2012 - 11:22 PM

Double clicking text with a gLabel on a gui puts the text on the clipboard?

I am using Windows 7, Autohotkey_L 1.1.05.01 Ansi version.

Seems to be happening with Windows 7, Vista, Autohotkey_L and Basic.


Here is my original post.
http://www.autohotke...topic83139.html

Is it a bug or undocumented feature?

#2 Guest Today

Guest Today
  • Guests

Posted 28 February 2012 - 11:27 PM

Sorry,

Heres the code.
Gui 1: Add, text, x6 y15 w60 h20 gGlabel , Static text
gui 1: show, w100 h60,test script
return


onclipboardchange:
TrayTip,%clipboard%,-,3
return

Glabel:
return


#3 fragman

fragman
  • Members
  • 1591 posts

Posted 29 February 2012 - 11:13 AM

I can confirm that. By the way, why is the OnClipboardChange label triggered on script start?

#4 Lexikos

Lexikos
  • Administrators
  • 8855 posts

Posted 29 February 2012 - 12:04 PM

On Vista+, WM_NCLBUTTONDBLCLK and WM_LBUTTONDBLCLK on static text controls will copy the static text to the clipboard.

EricLaw - MSFT
11/16/2008

Source: About Static Controls


why is the OnClipboardChange label triggered on script start?

On Windows XP and earlier (or AutoHotkey Basic on all Windows versions), OnClipboardChange is called once when the script starts because that is how the clipboard viewer chain (used to detect clipboard changes) works. On Windows Vista and 7 with AutoHotkey_L, the behaviour is replicated for consistency and backward-compatibility.

#5 fragman

fragman
  • Members
  • 1591 posts

Posted 29 February 2012 - 01:58 PM

Might be a good cleanup candidate for V2. On XP the first call could probably be ignored.

#6 Guest Today

Guest Today
  • Guests

Posted 29 February 2012 - 02:24 PM

On Vista+, WM_NCLBUTTONDBLCLK and WM_LBUTTONDBLCLK on static text controls will copy the static text to the clipboard.

EricLaw - MSFT
11/16/2008

Source: About Static Controls


Can this be added to the Autohotkey documentation?
Any suggestions on how to prevent this?
thanks