Master_MTA Posted August 28, 2017 Posted August 28, 2017 how i can get the clipboard text ? Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
John Smith Posted August 28, 2017 Posted August 28, 2017 (edited) You can't due to privacy reasons. Edited August 28, 2017 by John Smith 1 If you find my post useful or if it helped you, please like my post Ingame name: ZoeN
Master_MTA Posted August 28, 2017 Author Posted August 28, 2017 2 minutes ago, John Smith said: You can't due to privacy reasons. hmmm so that mean i can't create edit box dx like gui? Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
Ahmed Ly Posted August 28, 2017 Posted August 28, 2017 txt = "" function setClipboard (texts) txt = texts end function isClipboard () if txt ~= "" then return true else return false end end function getClipboard () return txt end -- Example addCommandHandler("qq", function (cmd,...) if arg ~= "" then local w = table.concat({...}, " ") setClipboard(w) outputChatBox("Done "..w.."") end end ) addCommandHandler("dd", function () if isClipboard () then outputChatBox(""..getClipboard().."") else outputChatBox("error") end end )
Master_MTA Posted August 28, 2017 Author Posted August 28, 2017 51 minutes ago, Ahmed Ly said: txt = "" function setClipboard (texts) txt = texts end function isClipboard () if txt ~= "" then return true else return false end end function getClipboard () return txt end -- Example addCommandHandler("qq", function (cmd,...) if arg ~= "" then local w = table.concat({...}, " ") setClipboard(w) outputChatBox("Done "..w.."") end end ) addCommandHandler("dd", function () if isClipboard () then outputChatBox(""..getClipboard().."") else outputChatBox("error") end end ) that wasn't my mean i mean if player was browser he is pc normal then he was copy any text then i need to get this copied text not only in mta Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
Moderators IIYAMA Posted August 28, 2017 Moderators Posted August 28, 2017 You can't 'get' it ingame. Only 'set' it, which you can use in any other application. Clear? 2 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Master_MTA Posted August 28, 2017 Author Posted August 28, 2017 45 minutes ago, IIYAMA said: You can't 'get' it ingame. Only 'set' it, which you can use in any other application. Clear? thx Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
Master_MTA Posted August 29, 2017 Author Posted August 29, 2017 19 hours ago, IIYAMA said: You can't 'get' it ingame. Only 'set' it, which you can use in any other application. Clear? no thing is possible for Master_MTA small usfel function u can use it with dx edit box like i was want with small example --------------------------useful function function getClipboard() if (getKeyState('rctrl')==true or getKeyState('lctrl')==true) and getKeyState('v')==true then local edit= guiCreateEdit ( 0,0,0,0, '',false,nil ) guiSetAlpha(edit,0) guiEditSetCaretIndex ( edit, 0 ) local text=guiGetText(edit) destroyElement(edit) return text end return false end -------------------------------------------- GUIEditor = { edit = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(542, 304, 403, 102, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(62, 39, 279, 24, "", false, GUIEditor.window[1]) end ) addEventHandler('onClientKey',root,function(btn,st) if st then guiSetText(GUIEditor.edit[1],getClipboard() or '') end end) 1 1 Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
Moderators IIYAMA Posted August 29, 2017 Moderators Posted August 29, 2017 It isn't the same as what getClipboard would do, because ctrl + v is required. But it is definitely useful. 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Master_MTA Posted August 29, 2017 Author Posted August 29, 2017 32 minutes ago, IIYAMA said: It isn't the same as what getClipboard would do, because ctrl + v is required. But it is definitely useful. 2 hours ago, Master_MTA said: small usfel function u can use it with dx edit box like i was want that i was said any way that will help us when we want to set Dx edit box text 1 Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now