SpecT Posted May 3, 2015 Posted May 3, 2015 (edited) 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. 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 June 15, 2015 by Guest
Mr.unpredictable. Posted May 3, 2015 Posted May 3, 2015 (edited) Edit: My bad sorry. Edited May 3, 2015 by Guest
Castillo Posted May 3, 2015 Posted May 3, 2015 @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.
Mr.unpredictable. Posted May 3, 2015 Posted May 3, 2015 @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.
SpecT Posted May 3, 2015 Author Posted May 3, 2015 @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 ...
Castillo Posted May 3, 2015 Posted May 3, 2015 The difference is that servers could use getClipboard to get what the player has copied ( could be passwords and such ).
Anubhav Posted May 3, 2015 Posted May 3, 2015 Hey person, what if a player copies a password? C'mon, that is one of the issue. You should think before posting.
SpecT Posted May 4, 2015 Author Posted May 4, 2015 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. 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. Have a good day guys!
Bonsai Posted May 5, 2015 Posted May 5, 2015 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.
Anubhav Posted May 5, 2015 Posted May 5, 2015 @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.
SpecT Posted May 6, 2015 Author Posted May 6, 2015 @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.
The_Walrus Posted May 27, 2015 Posted May 27, 2015 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.
Noki Posted June 7, 2015 Posted June 7, 2015 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!
ixjf Posted June 7, 2015 Posted June 7, 2015 And then developers have to implement workarounds for those who don't allow. Not a good idea.
Noki Posted June 7, 2015 Posted June 7, 2015 Why would a workaround even be needed? If the client doesn't want their clipboard being retrieved, then they don't want their clipboard being retrieved. Simple as that.
SpecT Posted June 15, 2015 Author Posted June 15, 2015 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).
Bonsai Posted June 15, 2015 Posted June 15, 2015 Sadly there are waaaaay to many retards in MTA, so anything has to be limited due to security reasons. Just like that upcoming ingame browser and other stuff.
Recommended Posts