Jump to content

Function getClipboard() / Event "onPlayerPaste"


Recommended Posts

Hello folks!

Today I was working on my dx panel and then I got an idea about a cool feature and guess what ... I can't get player's clipboard because of security reasons. :shock:

I simply want to get that what player copied for example youtube link and then paste it in the dxEditBox.

I can't get it. If you didn't make it "because of security reasons" then why I can paste anything in GUI's editbox ?

Hope that you will answer and think on making getClipboard() function.

Have a nice day!

Edited by Guest
Link to comment

@Unpredictable: You really should try to learn what he's saying, because that has nothing to do with this.

@toni: Even when I agree that this is a problem when it comes to creating our own DX library, we have to take security first.

Link to comment
@Unpredictable: You really should try to learn what he's saying, because that has nothing to do with this.

@toni: Even when I agree that this is a problem when it comes to creating our own DX library, we have to take security first.

Sorry, I couldn't understand anything from what he have written above.

What can't you understand? There is setClipboard but there is no getClipboard function. That's what I need.

@Solidsnake14 Okay but what's the difference ? You can paste in GUI but not in DX because you can't get player's clipboard. And what's the GUI's security if you can paste anything in it? That's weird ...

Link to comment
The difference is that servers could use getClipboard to get what the player has copied ( could be passwords and such ).

Oh, yeah I got it. :oops: Thanks for the calm explanation :!:

Hey person, what if a player copies a password? C'mon, that is one of the issue. You should think before posting.

Really? So I'm not thinking before posting ... Actually there are really much ways to get player's password and that "player may have copied his password" isn't a really smart move. Anyway, you had not to be so rude to express what you mean ...

I simply wanted to know what is the reason to not make this function.

So I'm gonna use GUI's editbox. :cry:

Have a good day guys!

Link to comment

Maybe instead there could be an event if a player presses CTRL + V, which means he wants to put it somewhere.

There you could grab the content and work with it.

I don't think there are any occasions where a player would press those buttons if not for pasting.

___________________________________________

Detecting Caps lock would also be useful.

As far as I know there is no way yet.

Anyway, I'm not really confident we will ever see such features.

Link to comment

@Bonsai, you can detect CTRL + V using getKeyState.

How to get the data he pasted?

Make a hidden edit box all over the screen ( alpha 0 ) and cursors off, focus on it when he presses ctrl and v. Then you may be able to do it like this.

Link to comment
@Bonsai, you can detect CTRL + V using getKeyState.

How to get the data he pasted?

Make a hidden edit box all over the screen ( alpha 0 ) and cursors off, focus on it when he presses ctrl and v. Then you may be able to do it like this.

Bonsai meant that there could be made an event which will be on player press ctrl + v. For example onPlayerPaste.

And about your idea .. it's a really good one.

Link to comment
  • 3 weeks later...

I don't really see why you need such function either, as said before it would be to easy to grab whatever a player has in his clipboard without noticing it. If you really want to get that content why don't you fire up a GUI with an edit box in where you ask your players to paste a link for instance. Then you can deal with whatever content you requested.

Link to comment
  • 2 weeks later...

You know how there is that checkbox in the multiplayer tab of settings which allows the client to permit screen upload by the server? Why not use a feature like that in this suggestion? That way the client will have to permit it, and it will only work if the client has that setting enabled.

If the client allows it, so be it!

Link to comment
  • 2 weeks later...

Lel guys ...

It would be better if the MTA Dev team make a new event for example onPlayerPaste which will be triggered when the client presses ctrl + v and get the client's clipboard. I don't want to get their clipboard without their permission. I just wanted to make DX editbox and make it possible to paste stuff in it (example: urls).

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...