steve8tch Posted February 25, 2004 Share Posted February 25, 2004 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. Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 25, 2004 Administrators Share Posted February 25, 2004 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. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Nutster Posted February 25, 2004 Share Posted February 25, 2004 MsgBox text can not be copied into the clipboard, but take a look at the ClipPut() function. ClipPut($msg) Msgbox(4096, "Information", $msg) David NuttallNuttall 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... Link to comment Share on other sites More sharing options...
steve8tch Posted February 25, 2004 Author Share Posted February 25, 2004 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... Thanks for your help - keep up this great work. Link to comment Share on other sites More sharing options...
scriptkitty Posted February 25, 2004 Share Posted February 25, 2004 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. Link to comment Share on other sites More sharing options...
MattNis Posted February 26, 2004 Share Posted February 26, 2004 (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 February 26, 2004 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] Link to comment Share on other sites More sharing options...
trids Posted February 26, 2004 Share Posted February 26, 2004 If you want to select it, you might try the hands on approach.AutoIt Window Spy.exeBest of all it is free.Of course! Nice lateral solution there, kitty Link to comment Share on other sites More sharing options...
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