Sign in to follow this  
Followers 0
steve8tch

Copy ' N Paste From Message Boxes

7 posts in this topic

I have a script that goes out onto the network to picks up information we need for writing reports eg MAC addess, serial no, manufacturer ,model no. etc and displays info in MsgBox(0,"info for PC called $PCname","blah blah blah").

What I would really like to do is copy 'n paste this info in our reports (rather than manually copy it!!). Is there a way of allowing the text displayed in a message box be 'selectable'.

Thanks for any feedback.

Share this post


Link to post
Share on other sites



If it's a standard mesage box then you should be able to get the text from it useing WinGetText()

You will get the text of the buttons in there too but you can probably hack that out once you know what to look for.

Share this post


Link to post
Share on other sites

MsgBox text can not be copied into the clipboard, but take a look at the ClipPut() function.

ClipPut($msg)
Msgbox(4096, "Information", $msg)

David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

Share this post


Link to post
Share on other sites

Thanks, lads, for the initial replies. The company I work for has subcontracted out the IT (you've heard the story before...) this company is big on asset managment.

This information that is collected by the script is copied into different parts of various forms. It would be handy just to be able to copy the bit of info I need and paste it ito the appropriate part of the form. I suppose at the end of the day I could just output the info into a text document and resize this to sit at the edge of the screen.

I was thinking that there must be a way of making text in a message box selectable. Text is selectable in some forms generated by outlook and access... - ah..just a thought... :whistle:

Thanks for your help - keep up this great work.

Share this post


Link to post
Share on other sites

If you want to select it, you might try the hands on approach.

AutoIt Window Spy.exe

Best of all it is free.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Have another AutoIT script wait for this MsgBox.

then use ControlGetText(windowname, "", control)

also, you can write all that info to a .INI file and assign hotkeys to the info you want to paste

Edited by MattNis

[quote]I was busy waiting all night for the Columbus Day Bunny to come down my chimney and light fireworks in my pumpkin.There's so much wrong with that.Oh, I'm sorry, i forgot you were Jewish.[/quote]

Share this post


Link to post
Share on other sites

If you want to select it, you might try the hands on approach.

AutoIt Window Spy.exe

Best of all it is free.

Of course! :whistle: Nice lateral solution there, kitty

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