motionman95 Posted July 10, 2010 Share Posted July 10, 2010 I'm wanting to know what is the best way to sort GUIs? It's just that I have like 5+ in my AutoIt script and it takes a TON of scrolling to reach my code. Is there a way to solve this..? Thanks in advance. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 10, 2010 Moderators Share Posted July 10, 2010 motionman95, Try using this this in SciTE - you can have as many of them as you want: #Region ; You can see what is inside when you click on the [+] ; But you cannot when you click on the [-]!!!! #Endregion Does it help? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
motionman95 Posted July 10, 2010 Author Share Posted July 10, 2010 motionman95, Try using this this in SciTE - you can have as many of them as you want: #Region ; You can see what is inside when you click on the [+] ; But you cannot when you click on the [-]!!!! #Endregion Does it help? M23 Awesome, that works perfectly! Only thing is isn't automatically hidden, but that's not much of a problem. Thanks! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 10, 2010 Moderators Share Posted July 10, 2010 motionman95,Only thing is isn't automatically hiddenEasily fixed! In SciTE, open the menu <Options - Open User Options File>. Taking careful note of the # END => DO NOT CHANGE ANYTHING BEFORE THIS LINE #-#-#-#-#-## START: DO NOT CHANGE ANYTHING AFTER THIS LINE #-#-#-#-#lines, add this:fold.on.open=1and everything will be hidden on start (You may need to restart SciTE to see the effect .M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
motionman95 Posted July 10, 2010 Author Share Posted July 10, 2010 motionman95,Easily fixed! In SciTE, open the menu <Options - Open User Options File>. Taking careful note of the # END => DO NOT CHANGE ANYTHING BEFORE THIS LINE #-#-#-#-#-## START: DO NOT CHANGE ANYTHING AFTER THIS LINE #-#-#-#-#lines, add this:fold.on.open=1and everything will be hidden on start (You may need to restart SciTE to see the effect .M23Awesome awesome awesome! Thanks * infinity! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 10, 2010 Moderators Share Posted July 10, 2010 motionman95,When you reply please use the "Add Reply" button at the top and bottom of the page rather then the "Reply" button in the post itself. That way you do not get the contents of the previous post quoted in your reply and the whole thread becomes easier to read. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
motionman95 Posted July 12, 2010 Author Share Posted July 12, 2010 Something weird: The region always seems to try and hope the line after it..? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 12, 2010 Moderators Share Posted July 12, 2010 motionman95,Often means a syntax error (a missing EndIf or something) in your script. Try running Tidy on it (SciTE <Tools> menu or Ctrl-T).M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
James Posted July 12, 2010 Share Posted July 12, 2010 Just a general post. I wish SciTE would remember where I close the regions and block statements when I re-open it. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
motionman95 Posted July 13, 2010 Author Share Posted July 13, 2010 @JamesBrooks: Actually, it does do that. But it will only work when the document is left open when Scite is closed... Err, on another topic, rather than create a new thread I decided to ask here. Like I said in the first post, I'm working with multiple GUIs. I was wondering if it was possible to store a control inside an array, in order to help keep the variables from interfering with each other in the multiple GUIs. Like this: Global $cSettings $settings = GUICreate("Redeem Now [by c0d3rk1d]", 371, 725, -1, -1) $cSettings["group1"] = GUICtrlCreateGroup("Login Autofiller", 6, 109, 358, 93) $cSettings["checkbox1"] = GUICtrlCreateCheckbox("Enable this", 15, 128, 97, 17) Thanks in advance! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 13, 2010 Moderators Share Posted July 13, 2010 motionman95, I was wondering if it was possible to store a control inside an arrayYou can of course store the ControlIDs in an array - but it is often difficult to remember which index refers to which control! To get around this, I use an Associative Array to store multiple ControlIDs. I can then use this array as a parameter within functions to prevent having to declare huge lists of Global variables or pass equally long lists of parameters when I call dependent functions: A couple of snippets (amended from one of my scripts) to show what I mean: ; Create associative array to list ControlID parameters Local $aParam_List AssocArrayCreate($aParam_List, 10) ; Create controls which I want to access in several functions AssocArrayAssign($aParam_List, "Title5", GUICtrlCreateCheckbox(...)) AssocArrayAssign($aParam_List, "Title6", GUICtrlCreateCheckbox(...)) AssocArrayAssign($aParam_List, "Title7", GUICtrlCreateCheckbox(...)) AssocArrayAssign($aParam_List, "Title8", GUICtrlCreateCheckbox(...)) AssocArrayAssign($aParam_List, "Title9", GUICtrlCreateCheckbox(...)) ; Create buttons which are only used in this function - so no need to put them in Local $hApply_Button = GUICtrlCreateButton("Apply", 198, 130, 90, 30) Local $hCancel_Global_Button = GUICtrlCreateButton("Cancel", 98, 130, 90, 30) ; Within GUIGetMsg loop Case $hApply_Button ; Apply defaults On_Global_Apply($aParam_List) ; Pass all the ControlIDs in the one parameter ; And then within the On_Global_Apply function Func On_Global_Apply($aParam_List) ; Check boxes If BitAND(GUICtrlRead(AssocArrayGet($aParam_List, "Title5")), $GUI_CHECKED) = $GUI_CHECKED Then ; ... If BitAND(GUICtrlRead(AssocArrayGet($aParam_List, "Title6")), $GUI_CHECKED) = $GUI_CHECKED Then ; ... If BitAND(GUICtrlRead(AssocArrayGet($aParam_List, "Title7")), $GUI_CHECKED) = $GUI_CHECKED Then ; ... If BitAND(GUICtrlRead(AssocArrayGet($aParam_List, "Title8")), $GUI_CHECKED) = $GUI_CHECKED Then ; ... If BitAND(GUICtrlRead(AssocArrayGet($aParam_List, "Title9")), $GUI_CHECKED) = $GUI_CHECKED Then ; ... You can see that using an Associative Array you do not have to remember the index - you use the associated title (hence the name!). I use Nuster's UDF from here. I hope this is useful. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
motionman95 Posted July 13, 2010 Author Share Posted July 13, 2010 (edited) @Melba23: Gah, wish there was a built in function for this, so I could have optimum speed...but I'll check that out. Edited July 13, 2010 by motionman95 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