Hellfire Posted May 7, 2006 Share Posted May 7, 2006 $text = "hi" Msgbox(0,"",$text) or Msgbox(0,"","hi") Which way is better? Link to comment Share on other sites More sharing options...
Valuater Posted May 7, 2006 Share Posted May 7, 2006 it really depends upon your needs... you could use a variable because you want to use the same meesage box for different messages otherwise, might as well make it "1" line 8) Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 7, 2006 Share Posted May 7, 2006 it really depends upon your needs...you could use a variable because you want to use the same meesage box for different messagesotherwise, might as well make it "1" line 8)HI,I would do in one line, but when you use the variable more than once it makes sense doing it that way, beacuse if the text changes, you can do it on one place.So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
flyingboz Posted May 8, 2006 Share Posted May 8, 2006 as you get more experience, you will likely start writing a collection of UDFs that mirror the way you think and the things you want msgbox() to do for you often -- such that you will rarely, if ever, call MsgBox() directly. For example, an Error Routine might look like the following... Func _FatalError($Title ="Fatal Error",$Desc="A Fatal Error Has Occurred",$ExitCode = -99,$TimeOut = 0) MsgBox(0,$Title,$Desc,$TimeOut) Exit $ExitCode EndFunc Generates a MsgBox and Exits with $ExitCode with just _FatalError() Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted May 8, 2006 Share Posted May 8, 2006 yeah as valuater said, the only place i really use variables is if im using the same thing alot hence stuff with files , but other then that if your doing a simple messagebox like that just do "hi" not the variable 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