 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Laszlo
Joined: 14 Feb 2005 Posts: 4078 Location: Pittsburgh
|
Posted: Sun Mar 06, 2005 2:32 am Post subject: TrimBinary |
|
|
Now we can have variables holding binary data, retrieved from ClipBoardAll. However, they cannot be merged together, because each piece has its end marker. When merged data is copied to the clipboard and pasted into an application, only the first piece actually appears, stopped short at the first end-mark.
A TrimBinary command would be very useful, and easy to implement: remove the first/last n bytes from a binary variable (without adding an end-of string marker). This way several pieces of (trimmed) clipboard instances could be merged. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Sun Mar 06, 2005 2:44 am Post subject: |
|
|
Unfortunately, the clipboard variables cannot be merged quite that simply. The clipboard contains a series of formats, but each of these formats must be unique. Thus, if you were to merge two clipboard variables together, any formats that appear more than once would overwrite the previous formats. In other words, the most recent instance of each format would take precedence.
Text is one example that can be merged, but you're probably better off using the normal %Clipboard% variable for that.
Other formats, such as images (DIB), cannot be merged as far as I know. This is because you can only have one pure image (bitmap) on the clipboard at any given time.
This does not count proprietary clipboard formats used by various programs such as Photoshop and MS Word. But it seems unlikely that such formats could be successfully merged simply by appending one saved data block to another.
In any case, there will probably be better support for reading and manipulating generic binary files/data someday. |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4078 Location: Pittsburgh
|
Posted: Sun Mar 06, 2005 2:52 am Post subject: |
|
|
| life is a bitch... |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|