How to copy text from a message box

Share your advanced PureBasic knowledge/code with the community.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

How to copy text from a message box

Post by Mistrel »

Just press Ctrl-C. I never knew that!

http://weblogs.asp.net/chuckop/archive/ ... 10153.aspx
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Also, if you know the hwnd of the messagebox, as you will if you hooked it, you can do:

Code: Select all

messagetext.s = Space(512)
GetDlgItemText_(hwnd, $FFFF, @messagetext, 512)
BERESHEIT
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Do you read minds or was that just good detective work? I found this trick while hunting for a function to do just that!

Is there a way to get the string length? And how did you get the value of the nIDDlgItem parameter?

Thank you! :D
Post Reply