Juvigy Posted August 12, 2008 Posted August 12, 2008 Is it possible to make the text shown in the simple "OK" msgbox "selectable" and "copy-ble" ? How can i implement this?
Glyph Posted August 12, 2008 Posted August 12, 2008 (edited) Ever try the helpfile? It's in the AutoIt folder under program files. 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 August 12, 2008 by BackStabbed tolle indicium
amokoura Posted August 12, 2008 Posted August 12, 2008 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.
ProgAndy Posted August 12, 2008 Posted August 12, 2008 (edited) MsgBoxes can always be copied Just press Ctrl-C MsgBox(0, 'tThe Box', "Test box") result: --------------------------- tThe Box --------------------------- Test box --------------------------- OK --------------------------- Edited August 12, 2008 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
Minikori Posted August 12, 2008 Posted August 12, 2008 BackStabbed said: Ever try the helpfile?It's in the AutoIt folder under program files.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
Juvigy Posted August 13, 2008 Author Posted August 13, 2008 ProgAndy said: MsgBoxes can always be copied 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.
Moderators SmOke_N Posted August 13, 2008 Moderators Posted August 13, 2008 (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 August 13, 2008 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.
Juvigy Posted August 13, 2008 Author Posted August 13, 2008 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.
Moderators SmOke_N Posted August 13, 2008 Moderators Posted August 13, 2008 Juvigy said: 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.
Malkey Posted August 13, 2008 Posted August 13, 2008 Juvigy said: 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])
Juvigy Posted August 14, 2008 Author Posted August 14, 2008 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 .
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now