Hallo!
Ich habe micht heute das erste mal mit AutoIT beschäftigt! Mir gefällt das Scripten sehr gut! Jedoch komme ich an diesem Punkt nicht weiter!
Hier erstmal der Quellcode:
[autoit]; Programm starten Abfrage
$answer = MsgBox(4, "Programm starten?", "Soll das Programm wirklich gestartet werden?")
; Ja, Nein
[/autoit][autoit][/autoit][autoit]If $answer = 7 Then
MsgBox(0, "Programm starten?", "Das Programm wird nun beendet")
Exit
EndIf
; Windowsform erstellen
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=form1.kxf\form1.kxf
$Form1_1 = GUICreate("Programm Starter", 282, 81, 324, 195)
$Button1 = GUICtrlCreateButton("Starten", 160, 8, 113, 25, 0)
$Button2 = GUICtrlCreateButton("Programm beenden", 88, 40, 113, 33, $BS_MULTILINE)
$Combo = GUICtrlCreateCombo("", 8, 8, 137, 25, $CBS_DROPDOWNLIST)
$Combo = GUICtrlSetData(-1,"calc.exe|cmd.exe|cleanmgr.exe|ipconfig.exe|devmgt.exe|dfrg.exe|dxdiag", "calc.exe")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
run()
Case $Button2
Exit
EndSwitch
WEnd
Ich möchte, dass er unter Case $Button1 bei run() das bei der ComboBox ausgewählte Programm startet!
Vielen Dank für die Hilfe!
euer
projekt