Hi Com, hab mir grade mit KODA eine Gui gebastelt und möchte jetzt wenn jmd zB. "Button1" drückt [Only registered and activated users can see links. Click Here To Register...] aufgerufen wird...
Wie mache ich das?
Wie mache ich das?
Case $Button1
ShellExecute("www.google.com")
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=c:\users\blindeagle\desktop\jar moddden\travianschnellzugriff.kxf
$Form1_1 = GUICreate("Form1", 598, 421, 282, 127)
$Pic1 = GUICtrlCreatePic("C:\Users\BlindEagle\Desktop\jar moddden\travian_05.jpg", 0, 0, 617, 433)
$LoginButton = GUICtrlCreateButton("LoginButton", 32, 384, 137, 33)
GUICtrlSetOnEvent(-1, "LoginButtonClick")
$TTButton = GUICtrlCreateButton("Getter-Tools (TT", 240, 384, 137, 33)
GUICtrlSetOnEvent(-1, "TTButtonClick")
$InaktivenButton = GUICtrlCreateButton("Inaktiven-Liste", 424, 384, 137, 33)
GUICtrlSetCursor (-1, 2)
GUICtrlSetOnEvent(-1, "InaktivenButtonClick")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func InaktivenButtonClick()
EndFunc
Func LoginButtonClick()
EndFunc
Func TTButtonClick()
EndFunc
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
$nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=c:\users\blindeagle\desktop\jar moddden\travianschnellzugriff.kxf
$Form1_1 = GUICreate("Form1", 598, 421, 282, 127)
$Pic1 = GUICtrlCreatePic("C:\Users\BlindEagle\Desktop\jar moddden\travian_05.jpg", 0, 0, 617, 433)
$LoginButton = GUICtrlCreateButton("LoginButton", 32, 384, 137, 33)
GUICtrlSetOnEvent(-1, "LoginButtonClick")
$TTButton = GUICtrlCreateButton("Getter-Tools (TT", 240, 384, 137, 33)
GUICtrlSetOnEvent(-1, "TTButtonClick")
$InaktivenButton = GUICtrlCreateButton("Inaktiven-Liste", 424, 384, 137, 33)
GUICtrlSetCursor (-1, 2)
GUICtrlSetOnEvent(-1, "InaktivenButtonClick")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func InaktivenButtonClick()
EndFunc
Func LoginButtonClick()
EndFunc
Func TTButtonClick()
$nMsg = GUIGetMsg()
Switch $nMsg
Case $LoginButton
ShellExecute("wwww.Google.de")
Exit
EndSwitch
EndFunc
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=c:\users\blindeagle\desktop\jar moddden\travianschnellzugriff.kxf
$Form1_1 = GUICreate("Form1", 598, 421, 282, 127)
$Pic1 = GUICtrlCreatePic("C:\Users\BlindEagle\Desktop\jar moddden\travian_05.jpg", 0, 0, 617, 433)
$LoginButton = GUICtrlCreateButton("LoginButton", 32, 384, 137, 33)
$TTButton = GUICtrlCreateButton("Getter-Tools (TT", 240, 384, 137, 33)
$InaktivenButton = GUICtrlCreateButton("Inaktiven-Liste", 424, 384, 137, 33)
GUICtrlSetCursor (-1, 2)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Case $LoginButton
ShellExecute("www.Google.de")
Exit
EndSwitch
WEnd
Ah also Case $LoginButton einfach unter machen :)Quote:
Case $LoginButton
ShellExecute("www.Google.de")
Unter das Exit.
Eine Switch Schleife ist immer so aufgebaut:
Switch <expression>
Case $button1
-tudas-
Case $button2
-tudies-
EndSwitch
While 1
Sleep(100)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $LoginButton
ShellExecute("www.Google.de")
EndSwitch
WEnd