Copy Text from edit fields to clipboard.
Posted: 20 Apr 2017, 21:26
I am trying to create a Gui that lets me enter a phone number, order number and due date variable set along with some text, and have it copy to the clipboard for me to paste elsewhere. I have searched various forums and tried the manual but reading coding manuals have never got me anywhere. heres the code i have that isnt working.
when i try to paste it i get nothing. with other tweaks i at least got "Due Needs Dispatch"
Can someone help figure out what ive got wrong?
Code: Select all
^!Numpad1::
Gui, 3:Show, w200 h200, OpsDeland
Gui, 3:Add, Edit, w80 vBTN, BTN
Gui, 3:Add, Edit, w80 vSO, SO#
Gui, 3:Add, Edit, vDate, Due Date
Gui, 3:Add, Checkbox, vDispatch, Dispatch Needed?
Gui, 3:Add, Button,, Copy
buttonCOPY:
{
GuiControlGet, Checked,,Dispatch ;Get The Value Of the checkbox
GuiControlGet, BTN
GuiControlGet, SO
GuiControlGet, Date
if (checked == 0)
{
Clipboard= %BTN% %SO#% Due %Date% Does not need Dispatch
Return
}
Else
{
Clipboard= %BTN% %SO% Due %Date% Dispatch Needed
;Clipboard= %Subject2%
return
}}
Can someone help figure out what ive got wrong?