dodger42 Posted August 10, 2006 Posted August 10, 2006 Hey all, I have read the docs, have tried a bunch of variations but am getting stuck with a "EndSelect with no matching Select" error at runtime. Select Case $debug = "true" Select Case $CmdLine[1] = "/startcmp1" _rotateDBG() Case $CmdLine[1] = "/startserver" _rotateDBG() Case Else ;$CmdLine[1] <> "/startcmp1" or $CmdLine[1] = "/startserver" $filehandle = FileOpen($debugFile, 1) If $filehandle = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit FileWriteLine($filehandle, @CRLF & _NowTime() & " BEGIN DEBUG LOGGING" & @CRLF) EndSelect EndSelect I tried all sorts of things, but have been staring at this snippet so long I am going blind. Please help!
dodger42 Posted August 10, 2006 Author Posted August 10, 2006 (edited) Thanks MHz. Like I said, blinded by looking at it too long Edited August 10, 2006 by dodger42
PsaltyDS Posted August 10, 2006 Posted August 10, 2006 Thanks MHz. Like I said, blinded by looking at it too long Are you using SciTE, and if not, why on Earth not?! SciTE presents brackets on the left side of screen for nesting fuctions, automaticaly indents, and by hitting Ctl-T you get Tidy, which finds many such mistakes before you compile. Even if you don't want to ultimately compile your script, if you compile in SciTE by F7 (Production) or Alt-F7 (Beta) you get a run through the interpreter's debugger, which catches (many, many, <sigh>, many) of my mistakes. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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