ClipBoardChange - Excel issues

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Jenny100
Posts: 2
Joined: 07 Mar 2019, 11:29

ClipBoardChange - Excel issues

Post by Jenny100 » 02 Jul 2022, 03:17

Hello AH Community.
Hoping to get some advice on a problem.

I am using the OnClipboardChange label and modified the example provided in the help just to save the clipboard contents if anything is copied into the clipboard:

Code: Select all

OnClipboardChange:
	FileAppend, %ClipboardAll%, c:\temp\data.bin
	
The script is running all the time in the background of course, but problem is Excel. If more than 64 rows are selected and COPIED, it shows the error:
"picture is too large and will be truncated"
and thus nothing is copied into the clipboard (or nothing that be saved for reproducing at a later date).

I found some info here: https://blog.techinline.com/2019/02/21/picture-is-too-large-and-will-be-truncated/
which states:
If your application interacts with the Windows clipboard using OLE technology, this indicates that somewhere your source code calls of the IDataObject interface. This interface contains the GetData method, which can result in the described Excel error when it tries to receive clipboard content in CF_METAFILEPICT format.
How to fix:
Skip the GetData call if the requested format is CF_METAFILEPICT."
Would anyone have any idea how the above info can be incorporated into the script to allow copying of excel data?
Grateful for your expertise.
Jen.

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: ClipBoardChange - Excel issues

Post by BoBo » 02 Jul 2022, 03:39

Probably of interest regarding AHK v.2 too. So maybe @lexikos might be willing to shed some light on this. Good luck 8-)

User avatar
JnLlnd
Posts: 487
Joined: 29 Sep 2013, 21:29
Location: Montreal, Quebec, Canada
Contact:

Re: ClipBoardChange - Excel issues

Post by JnLlnd » 07 Feb 2024, 10:39

This "The Picture Is Too Large and Will Be Truncated" issue has been discussed in the following thread and a solution is proposed:
viewtopic.php?style=19&f=81&t=125745
:thumbup: Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
:P Now working on Quick Clipboard Editor
:ugeek: The Automator's Courses on AutoHotkey

Post Reply

Return to “Ask for Help (v1)”