PsaltyDS Posted February 1, 2006 Share Posted February 1, 2006 I have a Combo Box problem in my GUI, and I know I'm missing something, but what? I run the example from the help file for GuiCtrlCreateCombo, and it works fine. I run mine and the list of options will not pull down. I can't see what I'm doing different. The options are all there, the list just won't pull down. ; Include statements #include <GUIConstants.au3> ; Construct GUI $GuiHandle = GUICreate("My GUI", 400, 100, -1, -1) GUICtrlCreateLabel("Function To Perform:", 10, 10, 125, 20, $SS_Right) $Combo_1 = GUICtrlCreateCombo("None", 145, 10, 245, 20) GUICtrlSetData($Combo_1, "Option One|Option Two|Option Three") GUISetState(@SW_SHOW, $GuiHandle) While (1) $GuiMsg = GUIGetMsg() If $GuiMsg = $GUI_EVENT_CLOSE Then Exit WEnd ...confusion reigns. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
jonk Posted February 1, 2006 Share Posted February 1, 2006 Hmm your code works for me. I have tested it with beta and prod. Link to comment Share on other sites More sharing options...
BigDod Posted February 1, 2006 Share Posted February 1, 2006 Works here to. Is there more to the script that could be causing the problem ? Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
GaryFrost Posted February 1, 2006 Share Posted February 1, 2006 set to height of the combo to 100 or higher 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...
Helge Posted February 1, 2006 Share Posted February 1, 2006 PsaltyDS is using Windows 2000 and you other guys are using Windows XP.How do I know this.. ? I have certain powers.@ PsaltyDS : Change the combo's height to around 100px and it will work. Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 1, 2006 Author Share Posted February 1, 2006 I'm going to reboot Windoze, re-install AutoIT and the Beta - something is wrong here. The example from the help file runs, but mine doesn't work. Anything with '#include <array.au3>' in it kicks an error: >Running: (3.1.1.0):C:\Program Files\AutoIt3\autoit3.exe "D:\Scripting\ChUsr\ChangeUser.au3" C:\Program Files\AutoIt3\Include\array.au3 (170) : ==> Badly formatted "Func" statement.: Func _ArrayDisplay(Const ByRef $avArray, $sTitle) Func _ArrayDisplay(^ ERROR >AutoIT3.exe ended. That error is NOT produced if I run with Alt-F5 instead of just F5. And the GUI with the Combo box problem is also asigning a ControlID of 0 to the first button! So my GUI loop continuously executes the $GuiButton1 action! While (1) $GuiMsg = GUIGetMsg() MsgBox(32, "Debug", "$GuiMsg = " & $GuiMsg) Select Case $GuiMsg = $GUI_EVENT_CLOSE Exit Case $GuiMsg = $GuiButton1 MsgBox(32, $ScriptNameMsg, "Change User(s) button was pressed!") Case $GuiMsg = $GuiButton2 Exit EndSelect WEnd My whole AutoIT environment seems to have gone bonkers... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 1, 2006 Author Share Posted February 1, 2006 (edited) PsaltyDS is using Windows 2000 and you other guys are using Windows XP.How do I know this.. ? I have certain powers.@ PsaltyDS : Change the combo's height to around 100px and it will work. Sure enough... Is there a similar fix for the <array.au3> bug, or invalid control ID given to my button?Edit: Hmm... the example from the Help file gives no width/height at all, and it works on my computer. Removing those from my script did not fix it... what the heck? Edited February 1, 2006 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
jonk Posted February 1, 2006 Share Posted February 1, 2006 Sure enough... Is there a similar fix for the <array.au3> bug, or invalid control ID given to my button?Edit: Hmm... the example from the Help file gives no width/height at all, and it works on my computer. Removing those from my script did not fix it... what the heck? I have had this error too, after installing Beta 106. I used au2exe of the prodversion. After changing to betaversion au2exe it worked. Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 1, 2006 Author Share Posted February 1, 2006 I uninstalled beta 104, prod, and SciTE. Reinstalled prod, beta 106, SciTE, and SciTE Update. No change on my issues. This is REALLY UGLY! My script has GUI stuff, including buttons. It will have arrays later today. I can only use #include <array.au3> with the beta Run (alt-F5 in SciTE), but I can only use Buttons in Prod becuase the beta run causes all my buttons to get a control ID of 0! AAAAAArrrrrrrrgh! Is there a particular version of beta that will support both arrays and buttons on Win2K? My code so far: expandcollapse popup; Include statements #include <array.au3> #include <GUIConstants.au3> ; Construct GUI for operator interface $GuiHandle = GUICreate("Change User Functions", 400, 200, -1, -1) GUICtrlCreateLabel("Function To Perform:", 10, 10, 125, 20, $SS_Right) $Combo1 = GUICtrlCreateCombo("None", 145, 10, 245, 120) GUICtrlSetData($Combo1, "Change User's Password|Add User|Delete User|Make User Administrator|Make User Non-Administrator", "None") GUICtrlCreateLabel("Target User Name:", 10, 40, 125, 20, $SS_Right) $Input_1 = GUICtrlCreateInput("", 145, 40, 245, 20) GUISetState($GUI_DROPACCEPTED, $Input_1) GUICtrlCreateLabel("Target User Password:", 10, 70, 125, 20, $SS_Right) $Input_2 = GUICtrlCreateInput("", 145, 70, 245, 20) GUISetState($GUI_DROPACCEPTED, $Input_2) GUICtrlCreateLabel("Target Range:", 10, 100, 125, 20, $SS_Right) $Combo2 = GUICtrlCreateCombo("Local", 145, 100, 245, 120) GUICtrlSetData($Combo2, "Remote Computer|Workgroup List", "Local") GUICtrlCreateLabel("Target Comp/WkGrp:", 10, 130, 125, 20, $SS_Right) $Input_3 = GUICtrlCreateInput("", 145, 130, 245, 20) GUISetState($GUI_DROPACCEPTED, $Input_3) $GuiButton_1 = GUICtrlCreateButton("Change User(s)", 75, 160, 100, 30) $GuiButton_2 = GUICtrlCreateButton("Quit", 225, 160, 100, 30) MsgBox(32, "Debug", "$GuiButton_1 = " & $GuiButton_1 & @CRLF & _ "$GuiButton_2 = " & $GuiButton_2) GUISetState(@SW_SHOW, $GuiHandle) While (1) $GuiMsg = GUIGetMsg() Select Case $GuiMsg = $GUI_EVENT_CLOSE Exit Case $GuiMsg = $GuiButton_1 MsgBox(32, $ScriptNameMsg, "Change User(s) button was pressed!") Case $GuiMsg = $GuiButton_2 Exit EndSelect WEnd You may note I don't have any array functions in there yet that require array.au3, but they will be needed, and this SHOULD work! Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 1, 2006 Author Share Posted February 1, 2006 (edited) Confusion still reigns, but the fog is lifting slightly... 1. The issue with the Combo Box pull-down list is solved. Setting a height for the control of 100+ made it work in both Prod and Beta. This may be a compatibility with Win2K thang. 2. The issue with '#include <Array.au3>' is simply incompatibility between Prod and Beta versions. The installer for Beta overwrites the Prod include files, and breaks Array.au3 for Prod. Of course Beta include files need to go in a seperate place from Prod include files to prevent this, and the Gurus already knew that, and they are already working it. 3. The GuiCtrlButton() = 0 problem is not clear to me yet. That works in Prod but not Beta, so being overwriten by Beta doesn't seem to be the answer. The help file for Beta doesn't seem to show a new command syntax for this command, so I don't know what's going on there yet. Work'n it... well, watching as the smart people are work'n it... Edit: JdeB solved number 3 - My earlier 'GuiSetState()' should have been 'GuiCtrlSetState()'. By setting a funky state on the GUI instead of the control (without generating any errors to tip me off) the later GuiCtrlCreateButton command simply failed, returning zero. Confusion no longer reigns! The working version in progress now (for Beta only) is: CODE ; Include statements #include <array.au3> #include <GUIConstants.au3> ; Construct GUI for operator interface $GuiHandle = GUICreate(@ScriptName, 400, 200) GUICtrlCreateLabel("Function To Perform:", 10, 10, 125, 20, $SS_Right) $Combo_1 = GUICtrlCreateCombo("None", 145, 10, 245, 120) GUICtrlSetData($Combo_1, "Change User's Password|Add User|Delete User|Make User Administrator|Make User Non-Administrator", "None") GUICtrlCreateLabel("Target User Name:", 10, 40, 125, 20, $SS_Right) $Input_1 = GUICtrlCreateInput(@UserName, 145, 40, 245, 20) GUICtrlSetState($GUI_DROPACCEPTED, $Input_1) GUICtrlCreateLabel("Target Range:", 10, 70, 125, 20, $SS_Right) $Combo_2 = GUICtrlCreateCombo("Local", 145, 70, 245, 120) GUICtrlSetData($Combo_2, "Remote Computer|Workgroup List", "Local") GUICtrlCreateLabel("Target Comp/WkGrp:", 10, 100, 125, 20, $SS_Right) $Input_2 = GUICtrlCreateInput(@ComputerName, 145, 100, 245, 20) GUICtrlSetState($GUI_DROPACCEPTED, $Input_2) $GuiButton_1 = GUICtrlCreateButton("Change User(s)", 75, 160, 100, 30) $GuiButton_2 = GUICtrlCreateButton("Quit", 225, 160, 100, 30) GUISetState(@SW_SHOW, $GuiHandle) While (1) $GuiMsg = GUIGetMsg() Select Case $GuiMsg = $GUI_EVENT_CLOSE Exit Case $GuiMsg = $GuiButton_1 $Function = GUICtrlRead($Combo_1) $TargetUser = GUICtrlRead($Input_1) $TargetRange = GUICtrlRead($Combo_2) $TargetComp = GUICtrlRead($Input_2) ExitLoop Case $GuiMsg = $GuiButton_2 Exit EndSelect WEnd GUIDelete($GuiHandle) Select Case $Function = "None" Exit Case $Function = "Change User's Password" While (1) $NewUserPW = InputBox(@ScriptName, "Enter New Password For: " & $TargetUser, "", "*") If $NewUserPW = "" Then If @error = 1 Then Exit Else ContinueLoop EndIf EndIf If $NewUserPW = InputBox(@ScriptName, "Re-Enter New Password For: " & $TargetUser, "", "*") Then ExitLoop Else MsgBox(16, @ScriptName, "New password did not verify. Try Again.", 5) ContinueLoop EndIf WEnd EndSelect Edited February 1, 2006 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Developers Jos Posted February 1, 2006 Developers Share Posted February 1, 2006 Confusion still reigns, but the fog is lifting slightly... 3. The GuiCtrlButton() = 0 problem is not clear to me yet. That works in Prod but not Beta, so being overwriten by Beta doesn't seem to be the answer. The help file for Beta doesn't seem to show a new command syntax for this command, so I don't know what's going on there yet.Work'n it... well, watching as the smart people are work'n it... Look at the last post in your BUG report for your solution to this issue .. 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...
PsaltyDS Posted February 1, 2006 Author Share Posted February 1, 2006 Look at the last post in your BUG report for your solution to this issue .. I saw that before I came here to add the solution to my status post here! For everyone else's information -- JdeB rocks, but then you knew that! Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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