Code: Lua-- GUIlog_wnd = guiCreateWindow(457, 296, 447, 112, "CIT getSelectedText", false)preview_mem = guiCreateMemo(9, 23, 428, 49, "", false, log_wnd)close_log_btn = guiCreateButton(9, 71, 428, 31, "Close Window", false, log_wnd) -- Exportfunction getSelectedText(theGrid) local r, c = guiGridListGetSelectedItem(theGrid) if ((r > -1) and (c)) then local text = guiGridListGetItemText(theGrid, r, c) guiSetVisible(log_wnd, true) showCursor(true) guiSetText(preview_mem, text) endend -- Close preview window...function closePreview() guiSetVisible(log_wnd, false) showCursor(false)endaddEventHandler("onClientGUIClick", close_log_btn, closePreview, false)
You could directly using this function setClipboard
Uhm...not sure but instead of creating window on clicking and then copy/pasting it, you could directly using this function setClipboard