Saving the clipboard

Dan Friedman dan at
Tue Dec 10 15:18:01 EST 2002


My standalone contains several stacks files.  During the course of activity
in my standalone, I copy objects from one stack to another.  I want to
preserve the clipboard text during the copy/paste of objects.  Here are the
calls I am using to save the clipboard text:

on aLongRoutine
  --a whole bunch of stuff
  --focus is now on a stack file that is not in the standalone
  put saveClipboard() into isCBSaved
  --copy some objects
  --focus on another stack
  --paste objects

  if isCBSaved then
  end if
end aLongRoutine

function saveClipboard
  if the clipboard is "text" then
    select text of field "tempClipboard" of stack "aStack"
    --stack "aStack" is the mainStack of the standalone
    return true
    return false
  end if
end saveClipboard

on restoreClipboard
  select text of field "tempClipboard" of stack "aStack"
end restoreClipboard

The problem is the focus.  The text is not being pasted or copied from field
"tempClipboard" of stack "aStack".  Anyone have any ideas of what I am doing

Thank you in advance,

More information about the Use-livecode mailing list