$radio ...

06/19/2010 20:52 omer36#1
also... irgentwie bekomm ichs nciht ganz hin, wie muss mann das mit den $radio machen? mein bsp code:

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Form1"244135192124)
$Button1 GUICtrlCreateButton("go"60169749$WS_GROUP)
$Radio1 GUICtrlCreateRadio("Internet Explorer"12809325)
$Radio2 GUICtrlCreateRadio("Mozilla Firefox"120809325)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd 
also wenn ich auf "internet explorer" drücke und dann auch den button "go" soll sich internet explorer öffnen.. bei mozilla ebend mozilla..
was genau muss ich jetz machen?

MfG
06/19/2010 21:04 kknb#2
stichwörter: autoit hilfe, if...then...endif, guictrlread, shellexecute/run
06/19/2010 21:05 mipez#3
PHP Code:
If GUICtrlRead($Radio1) = True Then
...
ElseIf 
GUICtrlRead($Radio2) = True Then
...
EndIf 
06/19/2010 21:22 omer36#4
ich habs jetz so, aber so oder so startet nur internet explorer...
was ist falsch?

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Form1"244135192124)
$Button1 GUICtrlCreateButton("go"60169749$WS_GROUP)
$Radio1 GUICtrlCreateRadio("Internet Explorer"12809325)
$Radio2 GUICtrlCreateRadio("Mozilla Firefox"120809325)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button1
            _start
()
        EndSwitch
    
WEnd

Func _start
()
If 
GUICtrlRead($Radio1) = True Then
Run
("C:\Programme\Internet Explorer\iexplore.exe")
ElseIf 
GUICtrlRead($Radio2) = True Then
Run
("C:\Programme\Mozilla Firefox\firefox.exe")
EndIf
EndFunc 
06/19/2010 21:26 kknb#5
bitte
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#requireadmin
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 244, 135, 192, 124)
$Button1 = GUICtrlCreateButton("go", 60, 16, 97, 49, $WS_GROUP)
$Radio1 = GUICtrlCreateRadio("Internet Explorer", 12, 80, 93, 25)
$Radio2 = GUICtrlCreateRadio("Mozilla Firefox", 120, 80, 93, 25)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			_start()
	EndSwitch
WEnd

Func _start()
	If GUICtrlRead($Radio1) = 1 Then
		Run("C:\Programme\Internet Explorer\iexplore.exe")
	Else
		Run("C:\Programme\Mozilla Firefox\firefox.exe")
	EndIf
EndFunc   ;==>_start