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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Title Bar in VBScript

Status
Not open for further replies.

tkoehn

ISP
May 24, 2001
26
0
0
US
I am using a command in vbscript :

wscript.echo Text

a Window opens up with the title bar of

Windows Script Host

Does anyone know how I can change this to my own text?

Thanks
 
document.title = " "

there are sections of the title bar that are not manipulative though

_____________________________________________________________________
onpnt2.gif

 
Code:
returnValue = MsgBox("Text",options,"Title")
-or-
Call MsgBox("Text",options,"Title")

options: vbOKOnly, vbCancel, vbOKCancel, vbYesNo, vbQuestion, vbCritical, etc.  Defaults to vbOKOnly.

example:

retval = MsgBox("Are you sure you want to continue...",vbYesNo + vbQuestion,"Question")
If retVal = vbYes then
  MsgBox "You continued"
Else
  MsgBox "You canceled"
End If

HtH,


Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
I have tried to use the MsgBox, but it appears the lenth of my text can only be so long or something. It does not allow me to show all of the Text I need to show (24 lines 80 characters per line or close to it.), that is why I am using the Wscript.Echo command.

I am also having problems with Text formating, and can't find a way to use a cancel button when using the Wscript.Echo command....

Tony
 
This is where HTAs (instead of WSH scripts) come in.

They offer a convenient GUI for scripting without having to obtain a lot of strange components or trying to host IE within your WSH script via automation and deal with a lot of convoluted logic to "reach into" the IE instance to display output, accept input, or attach handlers to events.

An HTA is basically a DHTML page, but it is run more like a desktop application and has scripting security relaxed to about the same point as a WSH script. It is a whole different way of using scripting though, and diverting from your immediate task to explore HTA development might not be appropriate for you at this point. The quickest payback is for those with existing DHTML skills.

It doesn't offer much as a replacement for command-line (cscript) scripts, but it makes a lovely alternative to GUI (wscript) scripts if you require rich interaction or information display.

Introductory information can be found at:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top