AceLoc Posted September 6, 2006 Share Posted September 6, 2006 #Region ===> Account Information <=== If Not IsDeclared("sInputBoxAnswer") Then Dim $sAnswer1 $sAnswer1 = InputBox("Accountname","Please, Type in your Accountname below.","YOUR ACCOUNTNAME"," ","240","100","-1","-1") Select Case @Error = 0 Case @Error = 1 Case @Error = 3 EndSelect If Not IsDeclared("sInputBoxAnswer") Then Dim $sAnswer2 $sAnswer2 = InputBox("Password","Please, Type in your Password below.","YOUR PASSWORD"," ","240","100","-1","-1") Select Case @Error = 0 Case @Error = 1 Case @Error = 3 EndSelect #EndRegion ===> Account Information <=== is it possible to make this a little cleaner? or shorter... thats all. Thanks! [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
MHz Posted September 6, 2006 Share Posted September 6, 2006 If Not IsDeclared("sInputBoxAnswer") Then Dim $sAnswer1 If Not IsDeclared("sInputBoxAnswer") Then Dim $sAnswer2Well those 2 lines could be removed. Especially when the string representation does not match the variable. Did those numerical parameters get created as strings in your inputbox? I cannot see it shorter unless you want to remove some of the error checking that you may not want to check. Without the code for the error check inserted by you, then very differcult to consider any change. btw, topic title looks exactly like your last topic title. It could use some more imagination. Link to comment Share on other sites More sharing options...
AceLoc Posted September 6, 2006 Author Share Posted September 6, 2006 (edited) this wont be my last topic (maybe for today) its like 6:59AM here so need to sleep soon actually anyways.. i got this now: #Region ===> Account Information <=== $sAnswer1 = InputBox("Accountname","Please, Type in your Accountname below.","YOUR ACCOUNTNAME"," ","240","100","-1","-1") $sAnswer2 = InputBox("Password","Please, Type in your Password below.","YOUR PASSWORD"," ","240","100","-1","-1") #EndRegion ===> Account Information <=== any idea's to make it even SHORTER? Thanks! Edited September 6, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 6, 2006 Share Posted September 6, 2006 this wont be my last topic (maybe for today) its like 6:59AM here so need to sleep soon actually anyways.. i got this now: #Region ===> Account Information <=== $sAnswer1 = InputBox("Accountname","Please, Type in your Accountname below.","YOUR ACCOUNTNAME"," ","240","100","-1","-1") $sAnswer2 = InputBox("Password","Please, Type in your Password below.","YOUR PASSWORD"," ","240","100","-1","-1") #EndRegion ===> Account Information <=== any idea's to make it even SHORTER? Thanks! no offence but there are limitations to how much you can reduce code since you only have an inputbox and checking to see what happens, and whats so bad about having a longer script anyways? Link to comment Share on other sites More sharing options...
AceLoc Posted September 6, 2006 Author Share Posted September 6, 2006 no offence but there are limitations to how much you can reduce code since you only have an inputbox and checking to see what happens, and whats so bad about having a longer script anyways?nevermind i guess this is the shortest thats possible: $sAnswer1 = InputBox("Accountname","Please, Type in your Accountname below.","YOUR ACCOUNTNAME"," ","240","100","-1","-1") $sAnswer2 = InputBox("Password","Please, Type in your Password below.","YOUR PASSWORD"," ","240","100","-1","-1") Thanks for helping anyways p.s the bad thing about longer scripts is that it takes way longer to scroll [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 6, 2006 Share Posted September 6, 2006 well you can remove those -1s at the end... ur just saying default Link to comment Share on other sites More sharing options...
AceLoc Posted September 6, 2006 Author Share Posted September 6, 2006 well you can remove those -1s at the end... ur just saying defaultokay thanks for helping again [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
MHz Posted September 6, 2006 Share Posted September 6, 2006 this wont be my last topic (maybe for today) its like 6:59AM here so need to sleep soon actually anyways.. i got this now: #Region ===> Account Information <=== $sAnswer1 = InputBox("Accountname","Please, Type in your Accountname below.","YOUR ACCOUNTNAME"," ","240","100","-1","-1") $sAnswer2 = InputBox("Password","Please, Type in your Password below.","YOUR PASSWORD"," ","240","100","-1","-1") #EndRegion ===> Account Information <===oÝ÷ Ù©ò×ßÛ-¢f¤z+^½éÒäSájy,ßêº^!ü¨ºf¤z+m«lí¶Ê¬-éð«aj^Ì!z{ayƧqé[ºÛh+)ë,yԨʧyçm¡È^rG«®Ø¢ç(ºW`¡«%y©Ú²X¤zØb±«¢+Ø(ÀÌØí͹ÍÝÈÄô%¹ÁÕÑ ½à ÅÕ½Ðí½Õ¹Ñ¹µÅÕ½Ðì°ÅÕ½ÐíA±Í°QåÁ¥¸å½ÕȽչѹµ±½Ü¸ÅÕ½Ðì°ÅÕ½Ðíe=UH =U9Q95ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÈÐÀÅÕ½Ðì°ÅÕ½ÐìÄÀÀÅÕ½Ðì°ÅÕ½Ðì´ÄÅÕ½Ðì°ÅÕ½Ðì´ÄÅÕ½Ðì¤)%9½ÐÉɽÈQ¡¸($ìͽµ½)¹%( But does it work the way you would expect it to? Correct operation comes 1st before the consideration of the amount of code. 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