vmars Posted August 21, 2009 Share Posted August 21, 2009 (edited) Greetings... This pgm "FileWriteLog_vm.au3" compiles clean , but no output. It includes a pgm (below) "FileWriteLog_vm_inc.au3" , and Compiler output. 1) Any idea why no output? 2) This is probably NOT the fastest way to pgm it, all suggestions are welcome. Thanks..vm **** ; FileWriteLog_vm.au3 expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <C:\Users\vmars\Documents\AutoIt3\Examples\Helpfile\FileWriteLog_vm_inc.au3> ;Global $vmLogFileName, $vmLogFileAction, $vmLogThisMsg GUICreate("Test FileWriteLog_vm.au3", 300, 300, 20, 20) $hButton1 = GUICtrlCreateButton("create", 30, 60, 70, 25) $hButton2 = GUICtrlCreateButton("open", 30, 60, 70, 25) $hButton3 = GUICtrlCreateButton("write", 30, 60, 70, 25) $hButton4 = GUICtrlCreateButton("close", 30, 60, 70, 25) GUICtrlSetOnEvent($hButton1, "createButton") ; createButton GUICtrlSetOnEvent($hButton2, "openButton") ; createButton GUICtrlSetOnEvent($hButton3, "writeButton") ; createButton GUICtrlSetOnEvent($hButton4, "closeButton") ; createButton ;WinSetTrans("Example","",127) GUISetState() Func createButton() $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "create" $vmLogThisMsg = "create" FileWriteLog_vmFunc() ; EndFunc Func openButton() $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "open" $vmLogThisMsg = "create" FileWriteLog_vmFunc() EndFunc Func writeButton() $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "write" $vmLogThisMsg = "Log message" FileWriteLog_vmFunc() EndFunc Func closeButton() $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "close" $vmLogThisMsg = "close" FileWriteLog_vmFunc() EndFunc **** ;FileWriteLog_vm_inc.au3 expandcollapse popup#include <File.au3> Global $vmLogFileName, $vmLogFileAction, $vmLogThisMsg ; Func FileWriteLog_vmFunc() If $vmLogFileAction = "create" Then If FileExists($vmLogFileName) Then FileDelete($vmLogFileName) If Not _FileCreate($vmLogFileName) Then MsgBox(0, "_FileCreate Didn't work ", $vmLogFileName) EndIf $vmLogFileAction = "created" EndIf EndIf If $vmLogFileAction = "open" Then $file = FileOpen($vmLogFileName, 1) $vmLogFileAction = "opened" EndIf ; Check if file opened for writing OK If $file = -1 Then $vmLogThisMsg = "openError" Exit EndIf If $vmLogFileAction = "write" Then FileWrite($file, $vmLogThisMsg & @CRLF) $vmLogFileAction = "written" EndIf If $vmLogFileAction = "close" Then FileClose($file) $vmLogFileAction = "closed" Exit EndIf EndFunc **** >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\vmars\Documents\AutoIt3\Examples\Helpfile\FileWriteLog_vm.au3" /autoit3dir "C:\Program Files (x86)\AutoIt3" /UserParams +>17:39:50 Starting AutoIt3Wrapper v.2.0.0.1 Environment(Language:0409 Keyboard:00000409 OS:WIN_VISTA/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (1.54.14.0) from:C:\Program Files (x86)\AutoIt3 +>17:39:50 AU3Check ended.rc:0 >Running:(3.3.0.0):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\*****\Documents\AutoIt3\Examples\Helpfile\FileWriteLog_vm.au3" +>17:39:50 AutoIT3.exe ended.rc:0 +>17:39:51 AutoIt3Wrapper Finished >Exit code: 0 Time: 1.276 Edited August 22, 2009 by vmars Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 22, 2009 Moderators Share Posted August 22, 2009 vmars,Firstly, if you post code, please use Code tags. Put [autoit ] before and [/autoit ] after your posted code (but omit the trailing space - it is only there so the tags display here).Secondly, look carefully at your code. You create a GUI and then want to wait until a button is pressed. Question - where do you wait? Answer - nowhere at the moment, as there are only functions after the GUISetState() line, so the script exits as soon as the GUI is displayed - as shown by the identical times for starting and ending when you run:+>17:39:50 AU3Check ended.rc:0 >Running:(3.3.0.0):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\*****\Documents\AutoIt3\Examples\Helpfile\FileWriteLog_vm.au3" +>17:39:50 AutoIT3.exe ended.rc:0You need a loop of some sort to keep your GUI in existence:While 1 Sleep(10) ; Very important or you eat CPU cycles WEndThirdly - do you do realise all your buttons are in the same place? And I would strongly advise a GUISetOnEvent($GUI_EVENT_CLOSE,"close_function") line in there too. >_< 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...
vmars Posted August 22, 2009 Author Share Posted August 22, 2009 Ah, Thanks very much! I cleaned up all that stuff, and now it Runs, but:As soon as i click on a Button (CLOSE), i get the followint error:+>18:02:06 AU3Check ended.rc:0 >Running:(3.3.0.0):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\vmars\Documents\AutoIt3\Projects-vm\FileWriteLog-vm-Folder\FileWriteLog_vm.au3" @@ (69) :(02:11) closeButton() C:\Users\vmars\Documents\AutoIt3\Projects-vm\FileWriteLog-vm-Folder\FileWriteLog_vm_inc.au3 (23) : ==> Variable used without being declared.: If $file = -1 Then If ^ ERROR ->18:02:11 AutoIT3.exe ended.rc:1 +>18:02:13 AutoIt3Wrapper Finished >Exit code: 1 Time: 7.613I suspect that the prob is with these variabled, ;Global $vmLogFileName, $vmLogFileAction, $vmLogThisMsg Declared in FileWriteLog_vmFunc() as Global (see FileWriteLog_vmFunc(), on initial Post).Func closeButton() ConsoleWrite('@@ (69) >_<' & @MIN & ':' & @SEC & ') closeButton()' & @CR) ;### Function Trace $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "close" $vmLogThisMsg = "close" FileWriteLog_vmFunc() ConsoleWrite('@@ (74) ' & @MIN & ':' & @SEC & ') ()' & @CR) ;### Function TraceEndFunc Anyways, here is the ailing code of 'FileWriteLog_vm'. Thanks in advance!..vmexpandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <C:\Users\vmars\Documents\AutoIt3\Projects-vm\FileWriteLog-vm-Folder\FileWriteLog_vm_inc.au3> Opt("GUIOnEventMode", 1) ;Global $vmLogFileName, $vmLogFileAction, $vmLogThisMsg ; $Form1 = GUICreate("Test FileWriteLog_vm.au3", 683, 170, 260, 145) $Group1 = GUICtrlCreateGroup("", 8, 32, 665, 73) GUICtrlSetBkColor(-1, 0x3A6EA5) ; $hButton1 = GUICtrlCreateButton("create", 88, 57, 75, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) $hButton2 = GUICtrlCreateButton("open", 232, 57, 75, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) $hButton3 = GUICtrlCreateButton("write", 376, 57, 75, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) $hButton4 = GUICtrlCreateButton("close", 520, 56, 75, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") GUICtrlSetOnEvent($hButton1, "createButton") ; createButton GUICtrlSetOnEvent($hButton2, "openButton") ; createButton GUICtrlSetOnEvent($hButton3, "writeButton") ; createButton GUICtrlSetOnEvent($hButton4, "closeButton") ; createButton GUISetOnEvent($GUI_EVENT_CLOSE,"closeButton") ;WinSetTrans("Example","",127) GUISetState(@SW_SHOW) While 1 Sleep(100) ; Very important or you eat CPU cycles WEnd Func createButton() ConsoleWrite('@@ (42) :(' & @MIN & ':' & @SEC & ') createButton()' & @CR) ;### Function Trace $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "create" $vmLogThisMsg = "create" FileWriteLog_vmFunc() ; ConsoleWrite('@@ (47) :(' & @MIN & ':' & @SEC & ') ()' & @CR) ;### Function Trace EndFunc Func openButton() ConsoleWrite('@@ (51) :(' & @MIN & ':' & @SEC & ') openButton()' & @CR) ;### Function Trace $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "open" $vmLogThisMsg = "create" FileWriteLog_vmFunc() ConsoleWrite('@@ (56) :(' & @MIN & ':' & @SEC & ') ()' & @CR) ;### Function Trace EndFunc Func writeButton() ConsoleWrite('@@ (60) :(' & @MIN & ':' & @SEC & ') writeButton()' & @CR) ;### Function Trace $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "write" $vmLogThisMsg = "Log message" FileWriteLog_vmFunc() ConsoleWrite('@@ (65) :(' & @MIN & ':' & @SEC & ') ()' & @CR) ;### Function Trace EndFunc Func closeButton() ConsoleWrite('@@ (69) :(' & @MIN & ':' & @SEC & ') closeButton()' & @CR) ;### Function Trace $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "close" $vmLogThisMsg = "close" FileWriteLog_vmFunc() ConsoleWrite('@@ (74) :(' & @MIN & ':' & @SEC & ') ()' & @CR) ;### Function Trace EndFunc Func Form1Close() ConsoleWrite('@@ (78) :(' & @MIN & ':' & @SEC & ') Form1Close()' & @CR) ;### Function Trace Exit EndFunc Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 23, 2009 Moderators Share Posted August 23, 2009 vmars,The problem is in your FileWriteLog_vm_inc.au3 file. The simple solution is to declare $file as a Global variable. But there is another way which also offers a better solution. At present your functions contains the following:If $vmLogFileAction = "open" Then $file = FileOpen($vmLogFileName, 1) $vmLogFileAction = "opened" EndIf ; Check if file opened for writing OK If $file = -1 Then $vmLogThisMsg = "openError" Exit EndIfLook at that code carefully. Can you see that it will run the check lines even if you did not try to open a file? You need to put the check inside first If section. But you can make the whole section much clearer by using a Switch structure instead of the multiple Ifs:Switch $vmLogFileAction Case "open" $file = FileOpen($vmLogFileName, 1) ; Check if file opened for writing OK If $file = -1 Then $vmLogThisMsg = "openError" Exit EndIf $vmLogFileAction = "opened" Case "write" FileWrite($file, $vmLogThisMsg & @CRLF) $vmLogFileAction = "written" Case "close" FileClose($file) $vmLogFileAction = "closed" Exit EndSwitchYou still need to declare $file as Global, by the way!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...
vmars Posted August 24, 2009 Author Share Posted August 24, 2009 Yes, i do see, and Thanks very much! Another problem though: I want to change the color of BackGround of GUICtrlCreateGroup. I have tried all sorts of combinations, but am still unsuccessful. Thanks for your help!..vmOpt("GUIOnEventMode", 1);Global $vmLogFileName, $vmLogFileAction, $vmLogThisMsg ;$Form1 = GUICreate("Test FileWriteLog_vm.au3", 683, 170, 260, 145); $Group1 = GUICtrlCreateGroup("", 8, 32, 665, 73)GUICtrlSetBkColor($Group1, 0xFFD8D8) ; (-1, 0x3A6EA5) (-1, 0xFFD8D8);$hButton1 = GUICtrlCreateButton("create", 88, 57, 75, 25, $WS_GROUP)GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")GUICtrlSetColor(-1, 0xFFFFFF)GUICtrlSetBkColor(-1, 0x800000)$hButton2 = GUICtrlCreateButton("open", 232, 57, 75, 25, $WS_GROUP) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 24, 2009 Moderators Share Posted August 24, 2009 vmars,When I did the Search for "+GUISetBkColor +group +control" that you could (should?) have done for yourself, I found this.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...
vmars Posted August 24, 2009 Author Share Posted August 24, 2009 vmars, When I did the Search for "+GUISetBkColor +group +control" that you could (should?) have done for yourself, I found this. M23 Ah yes, i spent ~ 1+ hour searching. Didn't find . But did find post='657660'] . So my code now looks like: Opt("GUIOnEventMode", 1) ;Global $vmLogFileName, $vmLogFileAction, $vmLogThisMsg ; $Form1 = GUICreate("Test FileWriteLog_vm.au3", 683, 170, 260, 145) GUISetBkColor(0x0E2765, $Form1); (0xA0A0A0) GUICtrlCreateGraphic(11, 38, 664, 66) GUICtrlSetBkColor(-1, 0xFFD8D8); (-1, 0x3A6EA5) (-1, 0xFFD8D8) $Group1 = GUICtrlCreateGroup("", 8, 32, 665, 73) ; $hButton1 = GUICtrlCreateButton("create", 88, 57, 75, 25, $WS_GROUP) So, i learned that i can't Color a 'GUICtrlCreateGroup' . Can i also conclude that since GUICtrlCreateGraphic is coded before GUICtrlCreateGroup, that GUICtrlCreateGroup is Transparent, and will show the color underneath it? That's interesting! Thanks..vm ps: Oh, more about the search. What i searched for was 'GUICtrlSetBkColor'. Also, when i searched for your "+GUISetBkColor +group +control" what came back was a search for just GUISetBkColor. It appeard it had dropped the "+GUISetBkColor". Thanks..vm Link to comment Share on other sites More sharing options...
vmars Posted August 24, 2009 Author Share Posted August 24, 2009 Oh Bother; Now since i made last changes, screen is pretty, but Bottons don't work. I probably got things in the wrong order. When i press a Button, there is no Button behavior, no push and pop. How can i wake-up the Buttons? Could someone take a look at code and see what's up? Thanks..vm Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 24, 2009 Moderators Share Posted August 24, 2009 vmars,From the Help file for GUICtrlCreateGraphic:"Graphic control can be clicked so they should not overlap with other controls. If overlap is needed it is important to disable the graphic control : GuiCtrlSetState(-1,$GUI_DISABLE)."This is often the reason buttons, etc stop working - and from your code it looks as if the graphic overlaps the button! >_< 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...
vmars Posted August 24, 2009 Author Share Posted August 24, 2009 vmars, From the Help file for GUICtrlCreateGraphic: "Graphic control can be clicked so they should not overlap with other controls. If overlap is needed it is important to disable the graphic control : GuiCtrlSetState(-1,$GUI_DISABLE)." This is often the reason buttons, etc stop working - and from your code it looks as if the graphic overlaps the button! >_< M23 Ah, very cool. Everything is looking good. Please, what is the purpose of this statement: GUICtrlCreateGroup("", -99, -99, 1, 1) Here is the code (Thanks..vm); expandcollapse popup; FileWriteLog_vm.au3 #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <C:\Users\vmars\Documents\AutoIt3\Projects-vm\FileWriteLog-vm-Folder\FileWriteLog_vm_inc.au3> Opt("GUIOnEventMode", 1) ;Global $vmLogFileName, $vmLogFileAction, $vmLogThisMsg, $file, $LineCnt $Form1 = GUICreate("Test FileWriteLog_vm.au3", 683, 170, 260, 145) GUISetBkColor(0x0E2765, $Form1); (0xA0A0A0) GUICtrlCreateGraphic(11, 38, 664, 66) GUICtrlSetBkColor(-1, 0xFFD8D8); (-1, 0x3A6EA5) (-1, 0xFFD8D8) GuiCtrlSetState(-1,$GUI_DISABLE) ;(-1,$GUI_DISABLE) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group1 = GUICtrlCreateGroup("", 8, 32, 665, 73) ; $hButton1 = GUICtrlCreateButton("create", 88, 57, 75, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) $hButton2 = GUICtrlCreateButton("open", 232, 57, 75, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) $hButton3 = GUICtrlCreateButton("write", 376, 57, 75, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) $hButton4 = GUICtrlCreateButton("close", 520, 56, 75, 25, $WS_GROUP) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x800000) GUISetState(@SW_SHOW) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") GUICtrlSetOnEvent($hButton1, "createButton") ; createButton GUICtrlSetOnEvent($hButton2, "openButton") ; createButton GUICtrlSetOnEvent($hButton3, "writeButton") ; createButton GUICtrlSetOnEvent($hButton4, "closeButton") ; createButton GUISetOnEvent($GUI_EVENT_CLOSE,"closeButton") ;WinSetTrans("Example","",127) While 1 Sleep(100) ; Very important or you eat CPU cycles WEnd Func createButton() $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "create" $vmLogThisMsg = "create" FileWriteLog_vmFunc() ; EndFunc Func openButton() $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "open" $vmLogThisMsg = "open" FileWriteLog_vmFunc() EndFunc Func writeButton() $LineCnt = $LineCnt +1 $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "write" $vmLogThisMsg = ("Log message line " & $LineCnt) FileWriteLog_vmFunc() EndFunc Func closeButton() $vmLogFileName = "DebugLog.txt" $vmLogFileAction = "close" $vmLogThisMsg = "close" FileWriteLog_vmFunc() EndFunc Func Form1Close() Exit EndFunc Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 25, 2009 Moderators Share Posted August 25, 2009 vmars,Go look in the Help file - you will find the answer in the example on the GUICtrlCreateGroup page. >_< It is quite amazing how often that very useful, but sadly much-underused, resource can provide the solution.......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...
vmars Posted August 25, 2009 Author Share Posted August 25, 2009 (edited) vmars,Go look in the Help file - you will find the answer in the example on the GUICtrlCreateGroup page. >_< It is quite amazing how often that very useful, but sadly much-underused, resource can provide the solution.......M23Ah yes, i did find this one line with a comment. "GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group " So, does that mean, for every Group, there needs to be a corresponding "close group"? It didn't seem to matter where i put the close group. But i put it after the last BUTTON that visually lies within the Group. Anyways, the HELP document. Yes, i consult it all the time. But its not always apparent what is important at first reading. I am happy to admit that the AutoIt3 Help, is the best Help document that i have ever seen. Click on the 'Open this script' button and script pops up in Scite. Is that the correct positioning?Thanks..vm Edited August 25, 2009 by vmars Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 26, 2009 Moderators Share Posted August 26, 2009 vmars, Yes, you need to close each group with that statement - preferably just after the last control in the group. Remember that you can have several groups within the same script and you need to tell Autoit what controls are in which group - it cannot read your mind. Apologies if I sounded a little harsh about the Help file yesterday - nothing personal >_< . 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...
vmars Posted August 26, 2009 Author Share Posted August 26, 2009 vmars,Yes, you need to close each group with that statement - preferably just after the last control in the group. Remember that you can have several groups within the same script and you need to tell Autoit what controls are in which group - it cannot read your mind.Apologies if I sounded a little harsh about the Help file yesterday - nothing personal >_< .M23No problem. I do the same on occasion. Thanks for your help!..vm 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