Markus Posted January 23, 2006 Share Posted January 23, 2006 Hi! As my new script is quite long, i wanted to add regions, but if i do: #region ... ... Case .... #endregion The "Case" doesnt belong to the region somehow, if i close the upper region in the scite editor, the "case" isnt closed. "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output Link to comment Share on other sites More sharing options...
MHz Posted January 23, 2006 Share Posted January 23, 2006 Are you using the latest Scite4AutoIt3 as that sounds like a old problem that was solved previously in the SciLexer.dll. This is with using Switch, EndSwitch with those Case statements? Link to comment Share on other sites More sharing options...
Markus Posted January 23, 2006 Author Share Posted January 23, 2006 Hm i just updated but it still doesnt work "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output Link to comment Share on other sites More sharing options...
GaryFrost Posted January 23, 2006 Share Posted January 23, 2006 Works for me, maybe you could post a trimmed down piece of code that can duplicate the problem SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Markus Posted January 23, 2006 Author Share Posted January 23, 2006 #region Case #endregion "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output Link to comment Share on other sites More sharing options...
Markus Posted January 23, 2006 Author Share Posted January 23, 2006 Cant close "Case" with "#region" "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output Link to comment Share on other sites More sharing options...
GaryFrost Posted January 23, 2006 Share Posted January 23, 2006 looks like the Case fold over-rides the #region fold in this scenario SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 23, 2006 Moderators Share Posted January 23, 2006 #region Case #endregionA 'Case' is closed by EndSelect If using [select] or a EndSwitch if using [switch]. I'm not sure I'm understanding your example or if your assuming that #endregion closes all items before automatically: #region Select Case 1 = 1 MsgBox(0, '', '') #endregion EndSelect works #region Select Case 1 = 1 MsgBox(0, '', '') EndSelect #endregion works #region Select Case 1 = 1 MsgBox(0, '', '') EndSelect Works even without the closing of the #region #region Select Case 1 = 1 MsgBox(0, '', '') #endregion Won't work because there is no closing of the Select #region Case 1 = 1 MsgBox(0, '', '') #endregion Won't work because there is no Select/EndSelect Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 23, 2006 Developers Share Posted January 23, 2006 (edited) This is a case of bad syntax gives bad folding. This: #region Case #endregion Is the same as: #region Wend; or EndIF etc... #endregion The case/EndIF/Wend/Next etc statements cause the folding to go 1 level to the left. This is the reason that the folding gets confused....... Start with Select or Switch and things as they should..... Edited January 23, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Markus Posted January 23, 2006 Author Share Posted January 23, 2006 Right! I'm so stupid I just saw #region in a script, tried it... and tried it wrong^^ Thank you "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output 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