ajhhanekamp Posted July 24, 2009 Share Posted July 24, 2009 I have created an image and set it as background image but now i cannot click my buttons anymore.... some help would be much appreciated. Thanks in advance. Link to comment Share on other sites More sharing options...
Developers Jos Posted July 24, 2009 Developers Share Posted July 24, 2009 I have created an image and set it as background image but now i cannot click my buttons anymore.... some help would be much appreciated. Thanks in advance.wild guess: Your background picture is on the foreground.When you want a more precise answer you will have to show some code.Jos 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...
Valuater Posted July 24, 2009 Share Posted July 24, 2009 Amazing how often this gets asked... ( hint, hint ) 8) Link to comment Share on other sites More sharing options...
Zedna Posted July 24, 2009 Share Posted July 24, 2009 (edited) You are teasing him too much :-)from helpfile:Function GUICtrlCreatePicIf a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control : GuiCtrlSetState(-1,$GUI_DISABLE). Edited July 24, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ajhhanekamp Posted July 24, 2009 Author Share Posted July 24, 2009 I was able to put that in but somehow i still can't click any buttons o.O You are teasing him too much :-)from helpfile: Link to comment Share on other sites More sharing options...
Valuater Posted July 24, 2009 Share Posted July 24, 2009 I was able to put that in but somehow i still can't click any buttons o.ODid you reply to the first post???... No, show code and we can help8) Link to comment Share on other sites More sharing options...
ajhhanekamp Posted July 25, 2009 Author Share Posted July 25, 2009 Did you reply to the first post??? ... No, show code and we can help 8) Here is my complete code: expandcollapse popup#include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <Sound_Beta.au3> #include <Sound.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $Button_1, $Button_2, $Button_3, $Button_4, $msg, $n Local $GUI_DISABLE GUICreate("Games & Programs Launcher", 800, 600) HotKeySet("{ESCAPE}", "_Exit") $vSndID = _SoundOpen("C:\Pangya - carmelldansen.mp3") While 1 If _SoundStatus($vSndID) = "stopped" Then _SoundPlay($vSndID) Sleep(10) WEnd Func _Exit() _SoundStop($vSndID) Exit EndFunc GuiCtrlCreatePic('C:\Fire.jpg', 0, 0, @Desktopwidth, @DesktopHeight) GuiCtrlSetState(1,$GUI_DISABLE) $n = GUICtrlCreatePic("C:\games.jpg", 380, 10, 120, 120) Opt("GUICoordMode", 2) $Button_1 = GUICtrlCreateButton("Command and Conquer Generals", -480, 15, 170, 50) $Button_2 = GUICtrlCreateButton("Command and Conquer Generals Zero: Hour", 140, -50, 220, 50 ) $Button_3 = GUICtrlCreateButton("NTreev USA Pangya", 110, -50, 120 , 50) $n = GUICtrlCreatePic("C:\programs.jpg", -490, 30, 300, 100) $Button_4 = GUICtrlCreateButton("Microsoft Office Word 2003", -570, 15, 170, 50) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exitloop Case $msg = $Button_1 Run ( "E:\Command and Conquer Generals\generals.exe") Case $msg = $Button_2 Run ( "E:\Command & Conquer Generals Zero Hour\generals.exe") Case $msg = $Button_3 Run ( "E:\Ntreev USA\Pangya\update.exe") Case $msg = $Button_4 Run ( "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE") EndSelect WEnd EndFunc MsgBox(64, 'Notification', 'Games & Programs Launcher will close now') Exit Link to comment Share on other sites More sharing options...
Developers Jos Posted July 25, 2009 Developers Share Posted July 25, 2009 (edited) You get caught in the While..wend forever in the Examples Func. This is your code a little reorganized. Just move the If in the first loop into the second While...Wend loop expandcollapse popup#include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <Sound_Beta.au3> #include <Sound.au3> Opt('MustDeclareVars', 1) Example() MsgBox(64, 'Notification', 'Games & Programs Launcher will close now') Exit Func Example() Local $Button_1, $Button_2, $Button_3, $Button_4, $msg, $n Local $GUI_DISABLE GUICreate("Games & Programs Launcher", 800, 600) HotKeySet("{ESCAPE}", "_Exit") $vSndID = _SoundOpen("C:\Pangya - carmelldansen.mp3") ;While 1 ; If _SoundStatus($vSndID) = "stopped" Then _SoundPlay($vSndID) ; Sleep(10) ;WEnd GUICtrlCreatePic('C:\Fire.jpg', 0, 0, @DesktopWidth, @DesktopHeight) GUICtrlSetState(1, $GUI_DISABLE) $n = GUICtrlCreatePic("C:\games.jpg", 380, 10, 120, 120) Opt("GUICoordMode", 2) $Button_1 = GUICtrlCreateButton("Command and Conquer Generals", -480, 15, 170, 50) $Button_2 = GUICtrlCreateButton("Command and Conquer Generals Zero: Hour", 140, -50, 220, 50) $Button_3 = GUICtrlCreateButton("NTreev USA Pangya", 110, -50, 120, 50) $n = GUICtrlCreatePic("C:\programs.jpg", -490, 30, 300, 100) $Button_4 = GUICtrlCreateButton("Microsoft Office Word 2003", -570, 15, 170, 50) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 Run("E:\Command and Conquer Generals\generals.exe") Case $msg = $Button_2 Run("E:\Command & Conquer Generals Zero Hour\generals.exe") Case $msg = $Button_3 Run("E:\Ntreev USA\Pangya\update.exe") Case $msg = $Button_4 Run("C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE") EndSelect If _SoundStatus($vSndID) = "stopped" Then _SoundPlay($vSndID) WEnd EndFunc ;==>Example Func _Exit() _SoundStop($vSndID) Exit EndFunc ;==>_Exit Edited July 25, 2009 by Jos 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...
Zedna Posted July 25, 2009 Share Posted July 25, 2009 Also change GUICtrlSetState(1, $GUI_DISABLE)to GUICtrlSetState(-1, $GUI_DISABLE) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
GEOSoft Posted July 25, 2009 Share Posted July 25, 2009 Also change GUICtrlSetState(1, $GUI_DISABLE)to GUICtrlSetState(-1, $GUI_DISABLE)Also might want to take a look atLocal $GUI_DISABLEit has no value set. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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