Sign in to follow this  
Followers 0
dassksnz

I need some help

8 posts in this topic

Ok this is my first Autoit program and i dont no how to skip a section of the code. In an If and else statment how do i end the code if Else is triggered? please help!!!!! :x

Share this post


Link to post
Share on other sites



Welcome to the forum.

I'm sure you looked at the help file and saw something like "EndIF".

You may want to check out some of the Tutorials to understand some programming basics first. There is a link in my Sig.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites

Welcome to the forum.

I'm sure you looked at the help file and saw something like "EndIF".

You may want to check out some of the Tutorials to understand some programming basics first. There is a link in my Sig.

I used Endif but if say the program was login and if the login was right it would continue the script but if it is wrong how do u stop the script.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I used Endif but if say the program was login and if the login was right it would continue the script but if it is wrong how do u stop the script.

if it is wrong Then Exit

Please show the script part, it will be more easy...

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

We use functions usually for conditional statements.

Local $MyVar = 10

If $MyVar > 5 Then
   _func1()
Else
   _Func2()
EndIf

Func _func1()
     MsgBox(0,"Greater Than 5", "_func1()")
     Exit
EndFunc

Func _func2()
     MsgBox(0,"Less Than Or Equal To 5", "_func2()")
     ;code to do something else
EndFunc
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

if it is wrong Then Exit

Please show the script part, it will be more easy...

What is the keyword for exiting the script process.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

What is the keyword for exiting the script process.

Exit !

See HelpFile for Exit Function...Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

nevermind.

Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

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