Sign in to follow this  
Followers 0
AceLoc

Quick Question

8 posts in this topic

#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! :P


[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites



If Not IsDeclared("sInputBoxAnswer") Then Dim $sAnswer1

If Not IsDeclared("sInputBoxAnswer") Then Dim $sAnswer2
Well 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? :P

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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

this wont be my last topic (maybe for today) its like 6:59AM here so need to sleep soon actually :nuke:

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? :P

Thanks!

Edited by aceloc

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

this wont be my last topic (maybe for today) its like 6:59AM here so need to sleep soon actually :nuke:

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? :P

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?

Share this post


Link to post
Share on other sites

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

p.s the bad thing about longer scripts is that it takes way longer to scroll :nuke:


[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

well you can remove those -1s at the end... ur just saying default

Share this post


Link to post
Share on other sites

well you can remove those -1s at the end... ur just saying default

okay thanks for helping again :P

[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Share this post


Link to post
Share on other sites

this wont be my last topic (maybe for today) its like 6:59AM here so need to sleep soon actually :P

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0