AutoHotkey Community

It is currently May 27th, 2012, 12:31 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: June 21st, 2005, 3:00 am 
Offline

Joined: November 16th, 2004, 6:38 am
Posts: 153
Location: New York
Minor things, but here goes:

(1) When the clipboard is not empty and a script that contains an OnClipboardChange label is launched, the label is invoked (although technically no clipboard change has occurred).

(2) The OnClipboardChange label is at times invoked even though no change to the clipboard has occurred (as far as I can tell).

Try this sample script:

Code:
#Persistent
Return

OnClipboardChange:
IfNotEqual, ErrorLevel, 1, Return
MsgBox, 0, Clipboard Change!, [%Clipboard%]
Return

(1) Copy some text to the clipboard and launch the script -- a Clipboard Change! message will appear.

(2) With the script still running, open an Explorer folder, right-click a file within the folder and select Copy -- as expected, the file's full path will appear in a Clipboard Change! message. Dismiss the message and close the folder -- another Clipboard Change! message appears, again displaying the same file's path!

Jacques.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: June 21st, 2005, 1:16 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
JBensimon wrote:
(1) When the clipboard is not empty and a script that contains an OnClipboardChange label is launched, the label is invoked (although technically no clipboard change has occurred).
This appears to be by design. When a program inserts itself into the viewer chain, it receives an initial notification immediately. The program could be changed to override this, but at least in some circumstances, it seems desirable to have the first call happen immediately.

I've added the above behavior to the documentation. Comments are welcome.

Quote:
... close the folder -- another Clipboard Change! message appears
I think Explorer alters the clipboard in subtle ways when the originating window closes. I remember this behavior from Windows 9x (perhaps only older versions), where if you closed the originating window, whatever files you had put onto the clipboard disappeared from the clipboard!

Another potential issue is that some programs alter the clipboard two or more times in a row for operations such as Ctrl-C.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 21st, 2005, 6:46 pm 
Offline

Joined: November 16th, 2004, 6:38 am
Posts: 153
Location: New York
I figured it probably had nothing to do with AutoHotkey itself.

Thanks,

Jacques.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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