Jump to content

Copy to clipboard


blumi
 Share

Recommended Posts

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

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 by taietel
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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