Normal Topic Command button to copy to clipboard? (Read 1324 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Command button to copy to clipboard?
Jun 26th, 2008 at 5:32pm
Print Post Print Post  
Is there a command I can use to have the contents of an element copied to the Windows clipboard?
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Command button to copy to clipboard?
Reply #1 - Jun 26th, 2008 at 6:42pm
Print Post Print Post  
I just wrote a command that does this into SBasic. It will be in the next release. In the meantime, you'll probably have to use a macro.

In either case, use care. There is a possibility that your user has elected to copy information into their copy buffer and it may upset them if you overwrite that material.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Command button to copy to clipboard?
Reply #2 - Jun 26th, 2008 at 7:17pm
Print Post Print Post  
Quote:
I just wrote a command that does this into SBasic. It will be in the next release.

YAY!  I'll be looking for it.
Quote:
In the meantime, you'll probably have to use a macro.

Way too much work for such a trivial task, but thanks for the suggestion.
Quote:
In either case, use care. There is a possibility that your user has elected to copy information into their copy buffer and it may upset them if you overwrite that material.

I don't understand what you mean.  How could my clipboard affect their buffer?
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Command button to copy to clipboard?
Reply #3 - Jun 26th, 2008 at 7:38pm
Print Post Print Post  
When you use ctrl-C to copy data from an application to the OS's clipboard, you are copying data into a buffer that extends to all of the applications that the user may be running. So if your user uses cut or copy to save some text for pasting later. And, before they do paste that text, your Sesame application invisibly does another "copy to the Window's clipboard", your Sesame application will overwrite the data they are intended to paste later.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Command button to copy to clipboard?
Reply #4 - Jun 26th, 2008 at 8:10pm
Print Post Print Post  
But Control+C is individual to my own workstation, it copies to my own clipboard.  John can Control+C something else to his own clipboard, and Michelle can Control+C something else to hers.  And if any of us uses Control+V we only paste the contents of our individual clipboards.  I've never experienced an instance where I've used Control+V and pasted the contents of someone else's clipboard.  That would freak me out.

Are you saying that Sesame users somehow share a clipboard?  I still don't understand.
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Command button to copy to clipboard?
Reply #5 - Jun 26th, 2008 at 8:19pm
Print Post Print Post  
Infinity wrote on Jun 26th, 2008 at 8:10pm:
But Control+C is individual to my own workstation, it copies to my own clipboard.  John can Control+C something else to his own clipboard, and Michelle can Control+C something else to hers.  And if any of us uses Control+V we only paste the contents of our individual clipboards.  I've never experienced an instance where I've used Control+V and pasted the contents of someone else's clipboard.  That would freak me out.

Are you saying that Sesame users somehow share a clipboard?  I still don't understand.


No. I assumed that you were building an application that others would be using on their computers. But even if you are building an application that only you will be using, the same care applies. For example, if you copy a large complex bit of text from notepad to your clipboard, intending to paste it into an element in Sesame, and while you are in Sesame you (forgetting that it copied to the clipboard) you hit this button you are intending to create. It will silently overwrite the text you laboriously copied to your clipboard from notepad.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Command button to copy to clipboard?
Reply #6 - Jun 26th, 2008 at 8:26pm
Print Post Print Post  
Quote:
No. I assumed that you were building an application that others would be using on their computers.


This indeed a shared application.  So I am assuming from your warnings that Sesame users do share a clipboard, somehow, perhaps what the books call the "buffer"?  But I've never had a problem; I and my users use Control+C and Right-Click-Copy all the time and there's never been an incidence of crossover pasting.

If it is the "buffer" it's what I want to avoid.  I do not want to replicate F11, but Control+C.

Quote:
But even if you are building an application that only you will be using, the same care applies. For example, if you copy a large complex bit of text from notepad to your clipboard, intending to paste it into an element in Sesame, and while you are in Sesame you (forgetting that it copied to the clipboard) you hit this button you are intending to create. It will silently overwrite the text you laboriously copied to your clipboard from notepad.

This I understand, as I use the clipboard quite extensively.
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Command button to copy to clipboard?
Reply #7 - Jun 26th, 2008 at 8:43pm
Print Post Print Post  
Infinity wrote on Jun 26th, 2008 at 8:26pm:
Quote:
But even if you are building an application that only you will be using, the same care applies. For example, if you copy a large complex bit of text from notepad to your clipboard, intending to paste it into an element in Sesame, and while you are in Sesame you (forgetting that it copied to the clipboard) you hit this button you are intending to create. It will silently overwrite the text you laboriously copied to your clipboard from notepad.

This I understand, as I use the clipboard quite extensively.


The above is all I am talking about, or have been talking about. Nothing to do with client/server, multiple users, shared applications, or anything nearly so complicated.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Command button to copy to clipboard?
Reply #8 - Jun 27th, 2008 at 1:47pm
Print Post Print Post  
Thanks Mark!
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Editing Macro
Reply #9 - Jul 29th, 2008 at 6:19pm
Print Post Print Post  
Off topic replies have been moved to This Thread
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged