Hi Bruce
When I use the clipboard briefly, such as clip.setpaste()
I usually do it like this:
local oldclip = clip.get
clip.setpaste("some text")
clip.set(oldclip)
That only works if the clipboard contains text. If it contains
a bitmap or graphic metafile (vector drawing), that is lost.
I wonder whether new clip plugin calls, clip.save and clip.restore
could be created which save and restore the entire clipboard
as binary data, no matter what the format(s).
There would be no need for any args for clip.save and clip.restore
(if there is only one buffer or data file used) so we would do:
clip.save
;; any clipboard work
clip.restore
Instead of going into a user variable, it could go into
a special memory buffer, or even better a binary file,
which could always be the same: \powerpro\savedclip.dat
I think that if the user does: myvar=clip.save or myvar=clip.restore
it should not put any clipboard data into myvar because:
- bitmaps can be huge;
- it might be binary stuff including "00" bytes;
- it may not be suitable for manipulation by any PowerPro functions;
- anyway we have myvar=clip.get (or getrtf and gethtml) if it is
text which can make sense in a PowerPro variable.
Instead, if the user called myvar=clip.save
it could return 1 if there is anything in the clipboard
and 0 if the clipboard was empty.
Similarly, if the user called myvar=clip.restore
it could return 1 if there is something in the buffer or data file
and 0 if the buffer or file is empty or doesn't exist yet.
Thus no need for error messages.
Another thought: if the clip is saved in a binary file
it would also allow any kind of clip to survive across boots
and crashes.
As well as the obvious use in scripts,
designers could make a bar button (LeftClick save, RightClick restore)
for when work is interrupted.
Alan M
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~->
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/