Hello & Thanks ,
Is it possible to 'Copy to ClipBoard ?' in SB ?
Thanks...Vern
Copy to ClipBoard ?
Re: Copy to ClipBoard ?
No, it's not natively supported for now, but I bet you can still use CTRL+C from your browser ? What did you have in mind for this command ?
-
- Posts: 229
- Joined: Sat Mar 01, 2014 3:02 pm
Re: Copy to ClipBoard ?
This works with Firefox and Chrome (hopefully others too):
Code: Select all
Procedure.i CopyToClipboard(txt.s)
retval = 0
!var x = document.createElement("TEXTAREA");
!//styling is to prevent the element flashing on the screen
!x.style.position = 'fixed';
!x.style.top = 0;
!x.style.left = 0;
!x.style.width = '2em';
!x.style.height = '2em';
!x.style.padding = 0;
!x.style.border = 'none';
!x.style.outline = 'none';
!x.style.boxShadow = 'none';
!x.style.background = 'transparent';
!x.value = v_txt;
!document.body.appendChild(x);
!x.select();
!try {
!var ok = document.execCommand('copy');
!if(ok) { v_retval = 1; }
!} catch(err) {
!console.log(err.message);
!}
!document.body.removeChild(x);
ProcedureReturn retval
EndProcedure
Re: Copy to ClipBoard ?
I wrote a clipboard program ( http://www.portablefreeware.com/index.php?q=cliplog&m= ) which I am thinking about making changes to , so that it ( clipLog ) examines what is being copied . And it looks thru its cliplog.ini file to see if there is an entry for that word .Fred wrote:No, it's not natively supported for now, but I bet you can still use CTRL+C from your browser ? What did you have in mind for this command ?
If yes , cliplog would then launch the program associated with that word .
But I wanted to know if I could copy --> clipboard with SB .
I know that I could copy from any where , but I was thinking also of a local.webpage with all the keywords as Buttons .
Anyways , just an idea .
Thanks..vm