OMGWTFLOLBBQ Posted February 28, 2015 Share Posted February 28, 2015 Okay, I've looked all over. I know the answer is probably just on the next page. But just like the code, I know it's better to have someone else look it over sometimes. Maybe in the future if someone is attempting this they will appreciate the example. The problem is this: I've created a simple GUI with three buttons. One button launches an app then has said app go to the next screen. Second button does basically the same thing, but with Windows update. Third button just closes the box. Those all work fine. When I uncomment line 12 (Local $MsgM = GUICtrlCreateLabel("Application has completed all tasks. Please consider the following options.", 15, 35, 255, 150, $SS_CENTER)) All of the buttons cease to work. It works fine without the text(as it is below) I know there's probably a different way for me to add the text but for some reason I can't find it. expandcollapse popup;App #include <GUIConstantsEx.au3> #include <StaticConstants.au3> App() Func App() ; Create a GUI with various controls. Local $hGUI = GUICreate("Application done!", 275, 150) ; Create a horizontally centered text label for the inside of the GUI. ; Local $MsgM = GUICtrlCreateLabel("Application has completed all tasks. Please consider the following options.", 15, 35, 255, 150, $SS_CENTER) ; Create a button control. ; Button Positioning(Horizontal from left, Vertical from top, Button Width, Button Height) Local $idLSU= GUICtrlCreateButton("Lenovo System Update", 5, 110, 130, 25) Local $idWUpdate = GUICtrlCreateButton("Windows Update", 140, 110, 130, 25) Local $idClose = GUICtrlCreateButton("Close", 121, 135, 32, 15) ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) Local $iPID = 0 ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idClose ExitLoop Case $idLSU ; Run Lenovo System Utilty. $iPID = Run("C:\Program Files (x86)\Lenovo\System Update\TVSU.exe") WinWaitActive("System Update") ;Wait for it to be active before sending commands. Send("{Enter}") ;press next on LSU main screen. Case $GUI_EVENT_CLOSE, $idClose ExitLoop Case $idWUpdate ; Run Windows Update "Run("%windir%\system32\wuapp.exe startmenu")" $iPID = Run("wuapp.exe startmenu") WinWaitActive("Windows Update") ;Wait for it to be active before sending commands. Send("{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Enter}") ;Navigate to update link, then begin update check. EndSwitch WEnd ; Delete the previous GUI and all controls. GUIDelete($hGUI) ; Close the window process using the PID returned by Run. If $iPID Then ProcessClose($iPID) EndFunc ;App Any insight, help or direction pointing would be greatly appreciated. I wouldn't have been able to get to this point without these boards. Link to comment Share on other sites More sharing options...
jaberwacky Posted February 28, 2015 Share Posted February 28, 2015 It's the height of the label. I changed it 25 and that seemed to work. I only tested the Close button though. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
kaisies Posted February 28, 2015 Share Posted February 28, 2015 Posting from phone, but does the label overlap the buttons? Link to comment Share on other sites More sharing options...
UEZ Posted February 28, 2015 Share Posted February 28, 2015 (edited) OMG, it's very simple why it isn't working. WTF, your label in line is overlapping all controls below which cause an unresponsible button behaviour! Use this line instead: Local $MsgM = GUICtrlCreateLabel("Application has completed all tasks. Please consider the following options.", 15, 35, 255, 40, $SS_CENTER) or add GUICtrlSetState(-1, $GUI_DISABLE) just after that particular line to disable the lable control. LOL Br, UEZ PS: I love BBQ Edited February 28, 2015 by UEZ kylomas 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
OMGWTFLOLBBQ Posted February 28, 2015 Author Share Posted February 28, 2015 Thanks to everyone! I appreciate all of the help. I knew it was something that I was overlooking(or overlapping). All is right with the world now. 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