Chetwood 0 Posted December 13, 2010 Apparently I can't see the forest for the trees so maybe someone of you can help me out. I have a little script that among other things opens the cd tray when a drive letter is given as a command-line parameter. "myscript.au3 e" would open drive e. But how do I make the script exit immediately when it is started without any parameter? If $CmdLine[0] Then Exit Else do fancy stuff EndIf Exit does still execute "do fancy stuff" instad of stopping immediately. TIA. MultiMakeMKV: batch processing for MakeMKV (Win)MultiShrink: batch processing for DVD ShrinkOffizieller Übersetzer von DVD Shrink deutsch Share this post Link to post Share on other sites
funkey 128 Posted December 13, 2010 If $CmdLine[0] = 0 Then MsgBox(16, "Error", "No commandline parameter given!") Exit EndIf Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Share this post Link to post Share on other sites
Chetwood 0 Posted December 13, 2010 D'uh. Thanks. MultiMakeMKV: batch processing for MakeMKV (Win)MultiShrink: batch processing for DVD ShrinkOffizieller Übersetzer von DVD Shrink deutsch Share this post Link to post Share on other sites