bild vertauscht O.o

08/13/2010 15:40 qLADYofLORDp#1
Hai leuts

mein problemchen ist, dass wenn die IF aweisung erfüllt ist unpressed angezeigt und beim elseIf das pressed angezeigt wird.

hat vtl. einer eine idee wieso das so ist?

wäre um jede hilfe froh =)


Code:
		if $pos[0]>49 and $pos[1]>153 and $pos[0]<152 and $pos[1]<194 and _IsPressed(01) and $Button1 = 0 Then
			GUICtrlSetData($eichle0,GuiCtrlCreatePic("Img\Trumpf\3\eichle-pressed.jpg", 46, 104, 104, 42))         
			$Button1=1       
			MsgBox(0,"sdklfj",$Button1)
			While _IsPressed(01)                                                                                    
				Sleep(50)                                                                                              
			WEnd                                                                                                      
		ElseIf $pos[0]>49 and $pos[1]>153 and $pos[0]<152 and $pos[1]<194 and _IsPressed(01) and $Button1 = 1 Then       
			GUICtrlSetData($eichle0,GuiCtrlCreatePic("Img\Trumpf\3\eichle-unpressed.jpg", 46, 104, 104, 42))
			$Button1=0
			While _IsPressed(01)
				Sleep(50)
			WEnd
		EndIf
08/24/2010 10:41 qLADYofLORDp#2
hier hat dann wohl auch keine eine idee...
08/24/2010 12:19 Shadow992#3
Teste mal so:
PHP Code:
        if $pos[0]>49 and $pos[1]>153 and $pos[0]<152 and $pos[1]<194 and _IsPressed(01)  Then
        
if $Button1 0 Then
            GUICtrlSetData
($eichle0,GuiCtrlCreatePic("Img\Trumpf\3\eichle-pressed.jpg"4610410442))         
            
$Button1=1       
            MsgBox
(0,"sdklfj",$Button1)
            While 
_IsPressed(01)                                                                                    
                
Sleep(50)                                                                                              
            
WEnd                                                                                                      
        
Else     
            
GUICtrlSetData($eichle0,GuiCtrlCreatePic("Img\Trumpf\3\eichle-unpressed.jpg"4610410442))
            
$Button1=0
            
While _IsPressed(01)
                
Sleep(50)
            
WEnd
        
EndIf
        EndIf