Sign in to follow this  
Followers 0
onlineth

How to close an AutoIt Script?

3 posts in this topic

Hi, I feel like an idiot because I can't find a way to close my Script. I have an (If) statement and I want the (Then) part of it to close the script completely. How do I do this?

Thank you so much for your help and support.


online.png?theme=dark profile for Tom on Stack Exchange, a network of free, community-driven Q&A sites 

scientia potentia est

Share this post


Link to post
Share on other sites

#include <MsgBoxConstants.au3>

; Terminates script if no command-line arguments
If $CmdLine[0] = 0 Then Exit

; Alternative:
If $CmdLine[0] = 0 Then
    Exit
EndIf

MsgBox($MB_SYSTEMMODAL, "", "Script has command-line arguments.")
1 person likes this

Share this post


Link to post
Share on other sites

Thank you so much, this worked for me!!

If $CmdLine[0] = 0 Then
    Exit
EndIf

:thumbsup: :thumbsup: :thumbsup:


online.png?theme=dark profile for Tom on Stack Exchange, a network of free, community-driven Q&A sites 

scientia potentia est

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