Sign in to follow this  
Followers 0
Juvigy

MSGBOX function

11 posts in this topic

Is it possible to make the text shown in the simple "OK" msgbox "selectable" and "copy-ble" ?

How can i implement this?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Ever try the helpfile?

It's in the AutoIt folder under program files.

:P

Unless you're trying to change the buttons themselves directly?

I'm sure there's a way to mod this, though i'm not sure.

ControlSetText command may help, idk.

Edited by BackStabbed

tolle indicium

Share this post


Link to post
Share on other sites

Only with InputBox with the default value as the select-copyable data. It might just look weird if it had OK and Cancel buttons but you only needed one.

So I recommend making a custom GUI.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

MsgBoxes can always be copied :P Just press Ctrl-C

MsgBox(0, 'tThe Box', "Test box")

result:

---------------------------
tThe Box
---------------------------
Test box
---------------------------
OK   
---------------------------
Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Ever try the helpfile?

It's in the AutoIt folder under program files.

:P

Unless you're trying to change the buttons themselves directly?

I'm sure there's a way to mod this, though i'm not sure.

ControlSetText command may help, idk.

I think he means highlight it, and I'm pretty there isn't, I've never seen in .exes before. Your best bet would be a gui that has a blank button with a label on top.

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Share this post


Link to post
Share on other sites

MsgBoxes can always be copied :P Just press Ctrl-C

MsgBox(0, 'tThe Box', "Test box")

result:

---------------------------
tThe Box
---------------------------
Test box
---------------------------
OK   
---------------------------
In this example i would like to be able to select and copy the text "Test box".This is not possible in your example i have tried it.I guess i will try what $Minikori suggests.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

http://www.autoitscript.com/forum/index.ph...c=32275&hl=

Edit:

Just read your last post, thought you wanted to "change" the button names.

ControlGetText() will get the message box info. Use the AutoInfo.exe to get the controlnameNN and or control id.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

You dont get it - i want to be able to copy the text shown in the msgbox - MsgBox(0, 'tThe Box', "1212121212") In this example i want to be able to copy the "1212121212" and paste it in some chat for example. I want the user to start the .exe file and when the msgbox appears i want to be able to copy the info in it.

Share this post


Link to post
Share on other sites

You dont get it - i want to be able to copy the text shown in the msgbox - MsgBox(0, 'tThe Box', "1212121212") In this example i want to be able to copy the "1212121212" and paste it in some chat for example. I want the user to start the .exe file and when the msgbox appears i want to be able to copy the info in it.

You don't get it. You can't physically copy data that easy without using hotkeys and manipulation ControlGetText + ClipPut().

You're better off using Koda in SciTe and creating a GUI that uses real edit controls (not labels), so you can control the flow.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Is it possible to make the text shown in the simple "OK" msgbox "selectable" and "copy-ble" ?

How can i implement this?

The text is copiable with ProgAndy's example.

When the message box is visible press Ctrl C, the hot key copy command. If you paste at this stage, you will get all the text of the message box as shown in ProgAndy's post.

The text is selectable by running the following script which picks out the required text section from the clipboard. Then puts the required text back on the clip board for pasting.

Local $TextDat, $aDat
$TextDat = ClipGet()
$aDat = StringSplit($TextDat, @CRLF, 1)
if IsArray($aDat) then ClipPut ($aDat[4])

Share this post


Link to post
Share on other sites

Sorry, i see it is copy -able now:) But it copies all. Is it possible to select just one word and copy it ? With a simple msgbox? Guess not...

I will try the edit controls in a GUI .

Share this post


Link to post
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
Sign in to follow this  
Followers 0