Hallo,
ich wollte eine Combobox erstellen. Soweit, sogut, hat auch geklappt.
Allerdings möchte ich beim Auswählen eines Eintrages auch eine Aktion automatisch ausführen lassen.
In meinem Bsp. wäre es dann die Installation eines Druckertreibers für den ausgewählten Drucker:
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\GUI.kxf
$Form1 = GUICreate("Form1", 277, 261, 188, 112)
$Label1 = GUICtrlCreateLabel("Lokalen_Drucker inst.", 56, 184, 160, 17)
$Combo1 = GUICtrlCreateCombo("Drucker auswählen", 56, 200, 145, 25)
GUICtrlSetData(-1, "E232d|E240d", "Drucker auswählen")
$Button1 = GUICtrlCreateButton("Explorer", 56, 56, 147, 25, $WS_GROUP)
$Label2 = GUICtrlCreateLabel("Netzw. Drucker inst.", 56, 136, 160, 17)
$Combo2 = GUICtrlCreateCombo("Drucker auswählen", 56, 152, 145, 25)
$Combo3 = GUICtrlCreateCombo(".cmd auswählen", 56, 104, 145, 25)
$Label3 = GUICtrlCreateLabel(".cmd kopieren", 56, 88, 160, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nmsg = GUIGetMsg()
Select
Case $nmsg = $GUI_EVENT_CLOSE
ExitLoop
Case $nmsg = $Button1
RunAs( "Benutzer", "Domäne", "1234", 0, "c:\WINNT\explorer.exe")
EndSelect
WEnd
Wie bekomme ich denn nun die Aktion für die Installation hin?
Edit: Habs schon selber hinbekommen ![]()