blumi 2 Posted April 14, 2011 I have a GUI with a textbox. I want to make a button with "copy to clipboard and Exit" How to realize to mark all text and copy to clipboard? Thanks Share this post Link to post Share on other sites
UEZ 1,298 Posted April 14, 2011 What is a textbox? Further have a look to Clipboard functions in the help file! Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Share this post Link to post Share on other sites
blumi 2 Posted April 14, 2011 _ClipBoard_SetData sounds good, will read about it. Textbox, I meant GUICtrlCreateEdit ;-) Share this post Link to post Share on other sites
taietel 34 Posted April 14, 2011 (edited) Something like this? #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGui = GUICreate("Form1", 299, 184, 192, 114) $hEdit = GUICtrlCreateEdit("", 8, 8, 281, 137, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_NOHIDESEL,$ES_WANTRETURN,$WS_VSCROLL)) GUICtrlSetData(-1, "This is a text. Press the button to put to Clipboard...") $hButton = GUICtrlCreateButton("Put to Clipboard", 184, 152, 107, 25, $WS_GROUP) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hButton ClipPut(GUICtrlRead($hEdit)) MsgBox(0,"Done!","Your data is in the Clipboard.") Exit EndSwitch WEnd Edited April 14, 2011 by taietel Things you should know first...In the beginning there was only ONE! And zero...Progs:Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Share this post Link to post Share on other sites
blumi 2 Posted April 14, 2011 Something like this? #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGui = GUICreate("Form1", 299, 184, 192, 114) $hEdit = GUICtrlCreateEdit("", 8, 8, 281, 137, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_NOHIDESEL,$ES_WANTRETURN,$WS_VSCROLL)) GUICtrlSetData(-1, "This is a text. Press the button to put to Clipboard...") $hButton = GUICtrlCreateButton("Put to Clipboard", 184, 152, 107, 25, $WS_GROUP) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hButton ClipPut(GUICtrlRead($hEdit)) MsgBox(0,"Done!","Your data is in the Clipboard.") Exit EndSwitch WEnd Yes, that is perfect. Thanks Share this post Link to post Share on other sites