frage zu au3

05/29/2010 19:03 Artarex#1
Abend, hab auch mal ne frage zu au3. Also ich habe mir einen gui erstellt so weit zu gut. Der gut hat einen button start. Ich habe einen "code" geschrieben der ein programm öffnet(es ist ein spiel) hier mal der code:
Global $GUI = GUICreate("LC Einlogbot",500,500,-1,-1) ;Erstellt ein Fenster 100x100 Pixel
Global $BUTTON = GUICtrlCreateButton("start",10,70,80,20) ;Erstellt einen Button
GUISetState(@SW_SHOW, $GUI) ; Macht die GUI sichtbar
run ("C:\GAMIGO\LastChaosGER\LC")
nun meine frage: wie mache ich das wenn ich auf start drücke, dieses code ausgeführt wird?
05/29/2010 19:20 Cholik#2
#moved
05/29/2010 19:45 omer36#3
leicher ist es wenn du deine buttons mit KODA machst...(Koda FormDesigner)
ist ganz einfach und geht sehr schnell.. (kannst auf youtube schauen wie man damit umgeht, falls du es nicht weisst.)
wenn du es dann unter KODA machst bekommst du den code:

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("LC Einlogbot"500,500,-1,-1)
$Button1 GUICtrlCreateButton("START"10708020$WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit

    EndSwitch
WEnd 
um deinen button jetz zu zeigen was er machen muss, musst du das einfügen:
PHP Code:
        Case $Button1
            Run
("C:\GAMIGO\LastChaosGER\LC"
den fügst du unter dem "Exit" ein dann hast du dein (bis jetz) fertigen code:
PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("LC Einlogbot"500,500,-1,-1)
$Button1 GUICtrlCreateButton("START"10708020$WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button1
            Run
("C:\GAMIGO\LastChaosGER\LC"
    EndSwitch
WEnd 
MfG
05/29/2010 19:54 Artarex#4
Quote:
Originally Posted by omer36 View Post
leicher ist es wenn du deine buttons mit KODA machst...(Koda FormDesigner)
ist ganz einfach und geht sehr schnell.. (kannst auf youtube schauen wie man damit umgeht, falls du es nicht weisst.)
wenn du es dann unter KODA machst bekommst du den code:

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("LC Einlogbot"500,500,-1,-1)
$Button1 GUICtrlCreateButton("START"10708020$WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit

    EndSwitch
WEnd 
um deinen button jetz zu zeigen was er machen muss, musst du das einfügen:
PHP Code:
        Case $Button1
            Run
("C:\GAMIGO\LastChaosGER\LC"
den fügst du unter dem "Exit" ein dann hast du dein (bis jetz) fertigen code:
PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("LC Einlogbot"500,500,-1,-1)
$Button1 GUICtrlCreateButton("START"10708020$WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button1
            Run
("C:\GAMIGO\LastChaosGER\LC"
    EndSwitch
WEnd 
MfG


danke dir! kann geclosed werden frage 100% ig beantwortet^^