m0nk3yI3unz Posted June 27, 2007 Posted June 27, 2007 (edited) Just to say, this upload is taking forever... ooh.. thats why.. theres over 800 ppl on here. ANYWAYS... I had to recreate these ()_() Anyways... _Should($Variable, $Check) - simple simple simple conditional check to see if $Variable (it must be a variable) equates to $Check, and if not, raises the error level to 1 and returns -1. This one is just a bunch of code: _Alert($Message, $Flag, $Reset) - I mainly made this for debugging purposes. $reset - default 0, if 1, sets the error level back to 0. Alerts are as follows: Flag = -1 or 0, Plain message box with <!> ; titled "Error", message: "There was an error." and if $message was NOT "" or -1, then I appended "......rror. Program returned: "& $message Flag = 1 - same as above, but with a Yes or No dialog and an appended "Continue?". returns 1 if the person said No. Flag = 2 - same as -1, only with stop sign. Flag = 3 - same as 1, with stop sign Flag = 4 - Same as 1, with <?> Enjoi. -I3unz EDIT: dang slowness... I guess I have to put them in codes (I had tried to upload it.) expandcollapse popup;Had to recreate these. Made by m0nk3y_I3unz. Not taking the time to comment them. The instructions are on the boards. func _Should(ByRef $Var,$Target) if $Var = $Target Then return 0 else seterror(1) return -1 EndIf EndFunc Func _Alert($Message="",$Flag=0,$Reset=0) switch $Message case "" switch $Flag Case -1 msgbox(48+262144,"Error","There was an error.") if $Reset then seterror(0) return 0 case 0 msgbox(48+262144,"Error","There was an error.") if $Reset then seterror(0) return 0 case 1 if msgbox(4+48+262144,"Error","There was an error."&@CR&"Continue?") = 7 then return 1 if $Reset then seterror(0) case 2 msgbox(16+262144,"Error","There was an error.") if $Reset then seterror(0) return 0 case 3 if msgbox(4+16+262144,"Error","There was an error."&@CR&"Continue?") = 7 then return 1 if $Reset then seterror(0) case 4 if msgbox(4+32+262144,"Error","There was an error."&@CR&"Continue?") = 7 then return 1 if $Reset then seterror(0) case Else return -1 EndSwitch case -1 switch $Flag Case -1 msgbox(48+262144,"Error","There was an error.") if $Reset then seterror(0) return 0 case 0 msgbox(48+262144,"Error","There was an error.") if $Reset then seterror(0) return 0 case 1 if msgbox(4+48+262144,"Error","There was an error."&@CR&"Continue?") = 7 then return 1 if $Reset then seterror(0) case 2 msgbox(16+262144,"Error","There was an error.") if $Reset then seterror(0) return 0 case 3 if msgbox(4+16+262144,"Error","There was an error."&@CR&"Continue?") = 7 then return 1 if $Reset then seterror(0) case 4 if msgbox(4+32+262144,"Error","There was an error."&@CR&"Continue?") = 7 then return 1 if $Reset then seterror(0) case Else return -1 EndSwitch case else switch $Flag Case -1 msgbox(48+262144,"Error","There was an error.") if $Reset then seterror(0) return 0 case 0 msgbox(48+262144,"Error","There was an error. Program returned:"&@CR&$Message) if $Reset then seterror(0) return 0 case 1 if msgbox(4+48+262144,"Error","There was an error. Program returned:"&@CR&$Message&@CR&"Continue?") = 7 then return 1 if $Reset then seterror(0) case 2 msgbox(16+262144,"Error","There was an error. Program returned:"&@CR&$Message) if $Reset then seterror(0) return 0 case 3 if msgbox(4+16+262144,"Error","There was an error. Program returned:"&@CR&$Message&@CR&"Continue?") = 7 then return 1 if $Reset then seterror(0) case 4 if msgbox(4+32+262144,"Error","There was an error. Program returned:"&@CR&$Message&@CR&"Continue?") = 7 then return 1 if $Reset then seterror(0) case Else return -1 EndSwitch EndSwitch EndFunc ;test [auto];test[/auto] Edited June 27, 2007 by m0nk3yI3unz Monkeh.
Mast3rpyr0 Posted June 27, 2007 Posted June 27, 2007 (edited) does _Should basically do If $var = $check Then ...? EDIT: o hey look first line of code is my answer. Edited June 27, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here!
m0nk3yI3unz Posted August 12, 2007 Author Posted August 12, 2007 xD Yup Please tell if anyone uses? Thx! Monkeh.
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