Hey
Das Script:
Spoiler anzeigen
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_Description=(c) Pre-Beta-Zeuchs-Scripter seTT
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: seTT
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]; Script Start - Add your code below here
[/autoit] [autoit][/autoit] [autoit]#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
Global $Button1, $Button2
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Test", 608, 490, 184, 125)
;$Pic1 = GUICtrlCreatePic("C:\Users\Robert\Documents\ICQ\556818248\ReceivedFiles\376434353 Ars\gears-of-war.jpg", 0, 30, 625, 441)
$Label1 = GUICtrlCreateLabel( @TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF& _
@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF& _
@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF& _
@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF& _
@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF& _
@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF, 0, 0, 610, -1)
GUICtrlSetBkColor (-1, 0x000000)
GUICtrlSetColor(-1, 0xFFFFFF)
$Label2 = GuiCtrlCreateLabel( @TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF& _
@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF& _
@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF& _
@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF& _
@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF& _
@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF& _
@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@TAB&@CRLF, 1, 350, 610, -1)
GUICtrlSetBkColor (-1, 0x000000)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 10)
$Button1 = GuiCtrlCreateButton("Text Text Text", 50, 410, -1, -1)
GUICtrlSetBkColor (-1, 0x000000)
GUICtrlSetColor(-1, 0xFFFFFF)
$Button2 = GuiCtrlCreateButton("Text2 Text2 Text2", 440, 410, -1, -1)
GUICtrlSetBkColor (-1, 0x000000)
GUICtrlSetColor(-1, 0xFFFFFF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
MsgBox(0,"","klappt1")
;Shutdown (9)
Case $Button2
MsgBox(0,"","klappt2")
;ProgressOn("Läd...", "Lade")
; For $i = 0 to 101 step 1
; ProgressSet($i,"Lade..")
; Sleep ( 10 )
; Next
;ProgressOff()
EndSwitch
WEnd
Ich schätze, das Problem liegt darin, dass die Buttons über einem "unsichtbaren" Label erstellt worden sind, weshalb sie sich ja nicht anklicken lassen.
Wie kann ich das Problem beheben?