Merging clipboardAll doesn't work

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
EmmaEmily
Posts: 32
Joined: 25 Sep 2019, 05:30

Merging clipboardAll doesn't work

Post by EmmaEmily » 30 May 2023, 05:25

In the files All1.clip, All2.clip, and All3.clip, contents of the entire clipboard,
including text and images(!), have been saved. Is it possible to merge the contents of these files together?

Code: Select all

FileRead Content1 , *c G:\All1.clip
FileRead Content2 , *c G:\All2.clip
FileRead Content3 , *c G:\All3.clip
; Trying to merge the entire content failed:
Clipboard := Content1 Content2 Content3
Thanks.

User avatar
boiler
Posts: 16772
Joined: 21 Dec 2014, 02:44

Re: Merging clipboardAll doesn't work

Post by boiler » 30 May 2023, 06:21

Concatenation as you attempted is only for text strings. If you’re looking for a way to combine them such that they could be pasted all as one, there’s no native way to do it. Maybe you can combine things at the byte level to a new area in memory with a variable pointing to that if you really understand the format.

wetware05
Posts: 750
Joined: 04 Dec 2020, 16:09

Re: Merging clipboardAll doesn't work

Post by wetware05 » 30 May 2023, 06:47

Hi EmmaEmily

Basically (being reductionist) the three main formats to save content to the clipboard are "text only", .rtf, and .html, depending on the source of the clipboard caption. If you copy from Microsoft Word, all three formats are copied.

I made a clipboard with the same idea that you are looking for viewtopic.php?f=76&t=92963&start=60. I focused on keeping the .html format, which is the most universal and the best modifiable. It takes a long time to understand what goes on behind the scenes and how to get the best result.



In this post I shared the clipboard core: viewtopic.php?p=520415#p520415

Post Reply

Return to “Ask for Help (v1)”