dassksnz Posted December 17, 2010 Share Posted December 17, 2010 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!!!!! Link to comment Share on other sites More sharing options...
bo8ster Posted December 17, 2010 Share Posted December 17, 2010 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] Link to comment Share on other sites More sharing options...
dassksnz Posted December 17, 2010 Author Share Posted December 17, 2010 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. Link to comment Share on other sites More sharing options...
wakillon Posted December 17, 2010 Share Posted December 17, 2010 (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 ExitPlease show the script part, it will be more easy... Edited December 17, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
JohnOne Posted December 17, 2010 Share Posted December 17, 2010 (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 December 17, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
dassksnz Posted December 17, 2010 Author Share Posted December 17, 2010 if it is wrong Then ExitPlease show the script part, it will be more easy...What is the keyword for exiting the script process. Link to comment Share on other sites More sharing options...
wakillon Posted December 17, 2010 Share Posted December 17, 2010 (edited) What is the keyword for exiting the script process.Exit !See HelpFile for Exit Function... Edited December 17, 2010 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
MvGulik Posted December 17, 2010 Share Posted December 17, 2010 (edited) nevermind. Edited June 28, 2011 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 ... 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