Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Doubleclicking text being sent to clipboard


  • Please log in to reply
6 replies to this topic
Guest Today
  • Guests
  • Last active:
  • Joined: --
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?

Guest Today
  • Guests
  • Last active:
  • Joined: --
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


fragman
  • Members
  • 1591 posts
  • Last active: Nov 12 2012 08:51 PM
  • Joined: 13 Oct 2009
I can confirm that. By the way, why is the OnClipboardChange label triggered on script start?

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

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.

fragman
  • Members
  • 1591 posts
  • Last active: Nov 12 2012 08:51 PM
  • Joined: 13 Oct 2009
Might be a good cleanup candidate for V2. On XP the first call could probably be ignored.

Guest Today
  • Guests
  • Last active:
  • Joined: --

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

JnLLnd
  • Members
  • 193 posts
  • Last active: Jul 23 2015 02:15 AM
  • Joined: 30 Dec 2007

There is a workaround here:

http://www.autohotke...rd/#entry682358