Scripts Thread, Dialog Box Re-titlement in Coding and Web Development; Hi all,
A while ago, I downloaded a script from here to generate a Message of The Day. Works Wonders. ...
9th December 2009, 04:00 PM #1
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'
All Help Greatly Appreciated but unfortunately, not paid.
IDG Tech News
9th December 2009, 04:05 PM #2
What script? Was it VBS? AutoIT?
9th December 2009, 04:39 PM #3
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.
10th December 2009, 09:12 AM #4
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
10th December 2009, 09:16 AM #5
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")
Thanks to mac_shinobi from:
Earthling (10th December 2009)
By localzuk in forum Jokes/Interweb Things
Last Post: 20th July 2009, 03:28 PM
By ESXi_2008 in forum General Chat
Last Post: 25th June 2009, 02:03 PM
By firefox_2006 in forum Office Software
Last Post: 5th November 2008, 10:35 AM
By russdev in forum Hardware
Last Post: 7th March 2007, 11:47 AM
By Norphy in forum Windows
Last Post: 9th May 2006, 01:56 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)