Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Results without writing to file

Status
Not open for further replies.

SWarrior

MIS
Dec 19, 2003
111
US
I need to be able to display the results of my script without writing them to a file. I'm using an array to store my results, but the content is WAY to large for a single message box, and I need to be able to see all of the content at once.I can accomplish this by writing to a text file and then using notepad to open it, but then I have a residual file on the hard drive. Is there a way to post the content INTO a notepad without actually having a file for notepad to open ?? Basically, have my script read from the array and then write directly to notepad? When I close notepad, Nothing is saved unless I specifically say so.

-SWarrior
 
Duh, look for "clipboard" Sorry that I omitted that in the previous post.

_______
I love small animals, especially with a good brown gravy....
 
This method uses IE instead of notepad, but lets you structure your spript's output just like any web page, you can use colour and different sizes.

Code:
'Open IE and set at required size
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"  
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 800
objExplorer.Height = 570
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1  

'Create a document to accept the output.
Set objDocument = objExplorer.Document    
objDocument.Open 


'use objDocument.Writeln to add text to the document
'don't forget to use html tags to arrange the data.
objDocument.Writeln "Hello my friends<br>"
objDocument.Writeln "Hello my friends"
objDocument.Writeln "Hello my friends<br>"
objDocument.Writeln "Hello my friends<br>"


'finally close the document. IE will stay open until closed.
objDocument.Close

Hope it helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top