Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

How can I make msg box that can stuff copied from it


  • Please log in to reply
7 replies to this topic
Dudester
  • Guests
  • Last active:
  • Joined: --
Here is sample msg box

ButtonNumbers:MsgBox,262208,Tool, Please copy thesenumbers`n510-112-1111`n510-112-3333...lol
Return

This just displays numbers but I want it to be copyable

Is this possible

Anyone have a format that I can just insert what ever I want

Thanks dudes :lol:

jaco0646
  • Moderators
  • 3165 posts
  • Last active: Apr 01 2014 01:46 AM
  • Joined: 07 Oct 2006
All message boxes are copyable: hit Ctrl-c and check your clipboard.

None
  • Members
  • 3199 posts
  • Last active: Nov 05 2015 09:55 PM
  • Joined: 28 Nov 2009
Did you Know You can just put the data in the clipboard
Clipboard=510-112-1111`n510-112-3333
Make a gui
Gui, Add,Edit,ReadOnly,Please copy thesenumbers`n510-112-1111`n510-112-3333...lol
Gui, Show
or if you press control+c while a msgbox is open it's contents are copied to the clipboad

  • Guests
  • Last active:
  • Joined: --

Did you Know You can just put the data in the clipboard

Clipboard=510-112-1111`n510-112-3333
Make a gui
Gui, Add,Edit,ReadOnly,Please copy thesenumbers`n510-112-1111`n510-112-3333...lol
Gui, Show
or if you press control+c while a msgbox is open it's contents are copied to the clipboad


Ok so this is what I got

Posted Image

But I just button to pop out the msgbox not the front of GUI

But I will keep that in mind though for out put in GUI front

Thank you I will work on msg box for those numbers

Dudester
  • Guests
  • Last active:
  • Joined: --
So there's no way to have msgbox that is without clipboard that is copyable?

That way I don't have to have user do anything except copy directly

Thank you

Leef_me
  • Moderators
  • 8510 posts
  • Last active: Sep 10 2015 05:50 AM
  • Joined: 08 Apr 2009
>>This just displays numbers but I want it to be copyable

How do you want it to be done?
What action by the user causes the copying to occur?
Do you want the data to be written to the clipboard when the MsgBox is displayed?

>>So there's no way to have msgbox that is without clipboard that is copyable?
>>That way I don't have to have user do anything except copy directly

Your terminology is difficult to understand.

The clipboard is the standard method to allow the user to copy data from programs.

  • Guests
  • Last active:
  • Joined: --

>>This just displays numbers but I want it to be copyable

How do you want it to be done?
What action by the user causes the copying to occur?
Do you want the data to be written to the clipboard when the MsgBox is displayed?

>>So there's no way to have msgbox that is without clipboard that is copyable?
>>That way I don't have to have user do anything except copy directly

Your terminology is difficult to understand.

The clipboard is the standard method to allow the user to copy data from programs.


I am sorry I am difficult for you to understand :(

I simply want user to click button with stuff in msg box that they can from there copy and paste. No ctrl C just select what they want on msg box and copy.

Thank you for your time :lol:

Leef_me
  • Moderators
  • 8510 posts
  • Last active: Sep 10 2015 05:50 AM
  • Joined: 08 Apr 2009
Perhaps this script will be useful.
I try to be verbose in the comments to make it easier to modify.

In case you don't know yet, adding a ; as the first character of a line will change that line into a comment that AHk ignores. :wink:

I gave you 3 buttons and scripts, choose the one(s) you like and comment or delete the ones you don't want.

#singleinstance force

; you can put the text to display directly in the gui, add edit
;	or you can add it this way -- this seems 'nicer' ;)

text=Please copy thesenumbers`n510-112-1111`n510-112-3333...lol 

Gui, Add,Edit,vdata ReadOnly, %text%
Gui, Add, button, gcopy1, copy selected
Gui, Add, button, gcopy2  , copy && hide
Gui, Add, button, gcopy3 , copy && exit
Gui, Show,, this_win
return
;============================================================
copy1:	; copy selected

	; the next line gets only the selected text
controlget, OutVar, selected,, Edit1, this_win 

msgbox %OutVar%	; this is a diagnostic

clipboard:=OutVar  ; this puts the text on the clipboard

return
;============================================================
copy2:	; copy && hide

	; the next line gets only the selected text
controlget, OutVar, selected,, Edit1, this_win 

msgbox %OutVar%	; this is a diagnostic

clipboard:=OutVar  ; this puts the text on the clipboard

gui, destroy	; kills the gui, but not the program
return
;============================================================
copy3:	; copy && exit

	; the next line gets only the selected text
controlget, OutVar, selected,, Edit1, this_win

msgbox %OutVar%	; this is a diagnostic

clipboard:=OutVar  ; this puts the text on the clipboard

; fall through to kill the program

;============================================================

GuiClose:	; if the user clicks the close button, exit
Exit:
   ExitApp