Jump to content

#region at scite


Markus
 Share

Recommended Posts

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

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

#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

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

  • Moderators

#region

Case
    
#endregion
A '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

  • Developers

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.....

:lmao:

Edited 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

Right! I'm so stupid :lmao: 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...