Dialog Box Re-titlement
A while ago, I downloaded a script from here to generate a Message of The Day. Works Wonders. I was wondering what line(s) would I have to add to change the Dialog Box title from 'Windows Scripting Host' to something original, like..........hey......... 'Message of the Day' :cool:
All Help Greatly Appreciated but unfortunately, not paid.
What script? Was it VBS? AutoIT?
Sounds like wscript.echo command is being run. I may be inclined to change that to msgbox instead but i dont know why wscript.echo was used in the first place without looking at the script.
It's a VBS script and, yes, there's a number of lines in there that read 'wscript.Echo' and a variable or whatever.
Originally Posted by apeo
example 2 here
Guy's Scripting Ezine 46 - Example MsgBox() VBScript Function
MsgBox(prompt[, buttons][, title])
I will employ the 'Prompt' argument to display text in the Message box. 'Prompt' tells the user what the message box will achieve.
The most interesting MsgBox argument is - 'buttons'. The default value of 0 (zero) means just displays the OK button. If we change the value of buttons from 0 to 3 then we get two extra buttons, 'No' and 'Cancel'.
Example A: Buttons is assumed to be 0, the default value.
strMbox = MsgBox("Guy says you must select the LocalHost!")
Example B: Buttons is explicitly set to 3 (and title is added).
strMbox = MsgBox("Do you want the LocalHost?", 3 ,"Hostname")
When scripting with MsgBox, there are two numbers to be aware of, firstly there is the input or display 'Button' number, which controls the actual Message Box. Secondly, there is a separate output or return value number which we do not normally see. However, this return value can be acted upon by subsequent lines of the script.
Naturally, what happens to the output depends on which button you press, this is because unlike WScript.echo, MsgBox() is a function, and functions return values. Clicking the Yes button results in a return value of 6.
MsgBox("The message you want goes here", 0, "Title of the message box goes here")