|
You last visited: Today at 17:08
Advertisement
frage zu au3
Discussion on frage zu au3 within the AutoIt forum part of the Coders Den category.
05/29/2010, 19:03
|
#1
|
elite*gold: 1
Join Date: Aug 2009
Posts: 3,007
Received Thanks: 1,843
|
frage zu au3
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
|
#2
|
elite*gold: 4
Join Date: Aug 2008
Posts: 6,783
Received Thanks: 4,992
|
#moved
|
|
|
05/29/2010, 19:45
|
#3
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
|
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", 10, 70, 80, 20, $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", 10, 70, 80, 20, $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
|
#4
|
elite*gold: 1
Join Date: Aug 2009
Posts: 3,007
Received Thanks: 1,843
|
Quote:
Originally Posted by omer36
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", 10, 70, 80, 20, $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", 10, 70, 80, 20, $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^^
|
|
|
All times are GMT +1. The time now is 17:09.
|
|