ksmith247 Posted July 24, 2007 Share Posted July 24, 2007 Small script pulls info from WMI on a remote PC then displays that info in a msgbox. It works fine but I would like to be able to manually copy that info and paste in an email or txt file, etc. versus a screenshot of the msgbox. Could I use something other than a msgbox to display my results to accomplish this? Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
GEOSoft Posted July 24, 2007 Share Posted July 24, 2007 (edited) Small script pulls info from WMI on a remote PC then displays that info in a msgbox. It works fine but I would like to be able to manually copy that info and paste in an email or txt file, etc. versus a screenshot of the msgbox. Could I use something other than a msgbox to display my results to accomplish this?You must be passing a string to the message box so instead of $Txt = "BlaBlaBla" MsgBox(4096, "TEST", $Txt) use $Txt = "BlaBlaBla" ClipPut($Txt) MsgBox(4096, "TEST", $Txt) to put it on the clipboard. EDIT: Or if You are using Multiple MSGBOXs then ClipPut("") ClipPut(ClipGet() & $Txt & @CRLF) Edited July 24, 2007 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
qazwsx Posted July 24, 2007 Share Posted July 24, 2007 (edited) You could also use a Gui with an input box and make the desired text the default. Edited July 24, 2007 by sccrstvn93 Link to comment Share on other sites More sharing options...
MHz Posted July 24, 2007 Share Posted July 24, 2007 (edited) ... It works fine but I would like to be able to manually copy that info and paste in an email or txt file, ...You said manually? Run this MsgBox(0, 'The Msgbox Title', 'Some text here') Then press Ctrl + C to copy the text. The press Ctrl + V to paste into your email or txt file to get the below result. --------------------------- The Msgbox Title --------------------------- Some text here --------------------------- OK --------------------------- Edited July 24, 2007 by MHz Link to comment Share on other sites More sharing options...
qazwsx Posted July 24, 2007 Share Posted July 24, 2007 (edited) Does it just automatically copy the text of the msg box? Because i can't figure out how to highlight the text. Edited July 24, 2007 by sccrstvn93 Link to comment Share on other sites More sharing options...
ksmith247 Posted July 24, 2007 Author Share Posted July 24, 2007 You must be passing a string to the message box so instead of $Txt = "BlaBlaBla" MsgBox(4096, "TEST", $Txt) use $Txt = "BlaBlaBla" ClipPut($Txt) MsgBox(4096, "TEST", $Txt) to put it on the clipboard. EDIT: Or if You are using Multiple MSGBOXs then Thanks for the tip. Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
MHz Posted July 24, 2007 Share Posted July 24, 2007 Does it just automatically copy the text of the msg box? Because i can't figure out how to highlight the text.Yes. It does copy automatically without highlighting. A little feature MS added in. Link to comment Share on other sites More sharing options...
ksmith247 Posted July 24, 2007 Author Share Posted July 24, 2007 Does it just automatically copy the text of the msg box? Because i can't figure out how to highlight the text.Yes. In the example given the text is automatically copied to the clipboard prior to creating the msgbox. I have decided (until I find a better way) to use a msgbox with a flag 4 to give a Yes/No option. Clicking Yes results in copying the data, No will not. Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
ksmith247 Posted July 24, 2007 Author Share Posted July 24, 2007 (edited) You said manually? Run this MsgBox(0, 'The Msgbox Title', 'Some text here') Then press Ctrl + C to copy the text. The press Ctrl + V to paste into your email or txt file to get the below result. Just call me brain dead. Anyone have a smiley for :duhhhh: ??? Thanks MHz Edited July 24, 2007 by ksmith247 Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] 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