Page 1 of 1

Access to the system clipboard

Posted: 17 Apr 2014, 17:44
by gajop
Can we get two lua functions for using the clipboard?
Something that wraps around:
http://wiki.libsdl.org/SDL_GetClipboardText (unsynced read)
http://wiki.libsdl.org/SDL_SetClipboardText (unsynced ctrl)

Re: Access to the system clipboard

Posted: 17 Apr 2014, 19:11
by Jools
That would allow communicating between spring and WSR Macros (speech recognition), for instance.

Speech Recognition is cool if it works, but it doesn't usually work. But if it would work, it would be cool.

Re: Access to the system clipboard

Posted: 18 Apr 2014, 04:38
by Anarchid
i think you can already use voice commands in ZKL.

Re: Access to the system clipboard

Posted: 18 Apr 2014, 14:40
by Jools
Well, something must recognise the speech: ZKL has its own SR engine? Maybe you just mean text to speech.

Re: Access to the system clipboard

Posted: 18 Apr 2014, 16:02
by gajop
It's great that you're coming up of obscure reasons why you'd use it, but the most obvious one is copy/pasting text (usually in player communication) in and out of Spring.

Re: Access to the system clipboard

Posted: 18 Apr 2014, 17:46
by Jools
That's why I'm an ENTP :)

Re: Access to the system clipboard

Posted: 21 Apr 2014, 11:58
by knorke

Re: Access to the system clipboard

Posted: 21 Apr 2014, 13:01
by abma
uh-oh, spring can steal passwords from the clipboard.

these functions are missing:

- remote control computer
- remote shell
- task scheduler
- p2p network functions
- tor client

;)

Re: Access to the system clipboard

Posted: 21 Apr 2014, 14:31
by gajop
neat, thanks jk :)
abma wrote:uh-oh, spring can steal passwords from the clipboard.
Much like any other program on your PC. If we cared about spring passwords (assuming those are most likely to be in your clipboard), we wouldn't have an unencrypted lobby server communication and we wouldn't use md5 password hashes.

Re: Access to the system clipboard

Posted: 21 Apr 2014, 14:36
by abma
my post wasn't so serious...

yes, we need ssl/tls for all stuff, but as long as there are non-spring websites on this server its difficult to apply. not all browsers support SNI: http://en.wikipedia.org/wiki/Server_Name_Indication

Re: Access to the system clipboard

Posted: 21 Apr 2014, 14:39
by gajop
abma wrote:my post wasn't so serious...
I can't be too sure :P
Spring generally attempts to be safe first (not a bad thing), with closed filesystem and whitelist-based (luasockets) network access.

Re: Access to the system clipboard

Posted: 23 Apr 2014, 05:08
by Google_Frog
Spring could already steal passwords. Now Lua can too!