AutoIt Fehler

10/30/2008 16:25 kom4for2#1
PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
 
#Region 
$Form1 GUICreate("Form1"201138410508)
$Button1 GUICtrlCreateButton("Button 1"3224137250)
$Button2 GUICtrlCreateButton("Button 2"3256137250)
$Button3 GUICtrlCreateButton("Button 3"3288137250)
GUISetState(@SW_SHOW)
#EndRegion 
 
While 
$nMsg GUIGetMsg()
 
Switch 
$nMsg
 
Case $GUI_EVENT_CLOSE
Exit
 
Case 
$Button1
    guidelete 
$Form1 )
#Region
$Form2 GUICreate("Form1"395282381328)
$Pic1 GUICtrlCreatePic(""00393281BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button4 GUICtrlCreateButton("Button1"16240113250)
$Button5 GUICtrlCreateButton("Button2"136240113250)
$Button6 GUICtrlCreateButton("Button3"256240113250)
GUISetState(@SW_SHOW)
#EndRegion
    
While
$nMsg1 GUIGetMsg()
    Switch 
$nMsg1
 
Case $GUI_EVENT_CLOSE
Exit

Case 
$Button4
        
While
            If 
winexist ("notepad"then
            Sleep
("500")
            
MouseClick("left"300600)
            
MouseClick("left"300600)
            
Sleep("500")
        
WEnd
        
Case $Button5
    
    
Exit
Case 
$Button6
    MsgBox
("Anleitung","hallo")
    
    EndSwitch
    
WEnd

Endswitch
WEnd 
hallo, kann mir jmd sagen wo da der fehler is? find da nix -.- da soll bei
PHP Code:
While
        If 
winexist ("notepad"then
        Sleep
("500")
        
MouseClick("left"300600)
        
MouseClick("left"300600)
        
Sleep("500")
WEnd 
einer sein -.-

hoffe auf hilfe
10/30/2008 16:27 °Remus°#2
du hast das EndIf vergessen

einfach vor das WEnd setzten
10/30/2008 20:27 kom4for2#3
Quote:
Originally Posted by °Remus° View Post
du hast das EndIf vergessen

einfach vor das WEnd setzten
ok danke soweit,

aber noch ne frage
ich würde gerne, dass das script aus ESC beendet wird

pausiert hab ich schon selber geschafft aber wie macht man das dann mit exit?
10/30/2008 20:32 °Remus°#4
Hotkeyset("{ESC}","_end")

Func _end()
exit
EndFunc