Sign in to follow this  
Followers 0
orange

SciTe Question: Can the Main Program be collapsed?

5 posts in this topic

Basically just that -- I ahve a GUI that is about 400 lines to setup, so I would like to condense it like you can with loops and functions.

is there a way to do this?

Share this post


Link to post
Share on other sites



Basically just that -- I ahve a GUI that is about 400 lines to setup, so I would like to condense it like you can with loops and functions.

is there a way to do this?

As in "View/Toggle all folds" ?

:D


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

#region

#endregion

will collapse with folding in Scite4AutoIt3 Maybe like you mention with collapse...

Edit: Like folds I thought JdeB :D

Edited by MHz

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Refactor and structure your code!

Use regions. :D

#region - Global declarations
Global $guiMain, $ctlInput, $ctlLable
#endregion - Global declarations
; Include stuff
Main()
Exit
Func Main()
While 1
    $msg = GuiGetMsg()
    If $msg = 0 Then 
        Sleep(250)
    Else
        GuiMsgCracker($msg)
    EndIf
WEnd 
EndFunc 
Func GuiMsgCracker($msg)
    Switch $msg                   ;Switch requieres beta
            ;;;Do your stuff
        Case Else
    EndSwitch 
EndFunc

EDIT: Also remember CTRL+ALT+ LEFT_CLICK on a +/- in the sidebar of the code will fold all subfolds. CTRL+SHIFT+LEFT_CLICK does something else.

Edited by Uten

Share this post


Link to post
Share on other sites

thanks guys

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