Jump to content

Quick Question


AceLoc
 Share

Recommended Posts

#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]

Link to comment
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.

Link to comment
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!

Edited by aceloc

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

Link to comment
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?
Link to comment
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]

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...