Code: Alles auswählen
Select RSet("C:\Programme",4)
Case ".exe" oder weißichwas
RunProgram(musst_du_schon_selber_wissen)
Default
RunPorgram(den Arbeitsplatz)
EndSelect
AndyX
Code: Alles auswählen
Select RSet("C:\Programme",4)
Case ".exe" oder weißichwas
RunProgram(musst_du_schon_selber_wissen)
Default
RunPorgram(den Arbeitsplatz)
EndSelect
Code: Alles auswählen
RunProgram("explorer",Keine_ahnung,"")
Code: Alles auswählen
program$ = GetFilePart(gadgettext$)
RunProgram(program$,RemoveString(gadgettext$,program$),"")
Code: Alles auswählen
; By 125
;- Window Constants
;
Enumeration
#Fenster
EndEnumeration
;- Gadget Constants
;
Enumeration
#Text_0
#path
#OK
#Abort
#Requester
#Requester2
EndEnumeration
Procedure Open_Fenster()
If OpenWindow(#Fenster, 268, 161, 500, 107, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "Ausführen")
If CreateGadgetList(WindowID())
TextGadget(#Text_0, 70, 0, 350, 20, "Geb sie den Namen eines Programms, Ordners oder Dokumentes an.", #PB_Text_Center)
StringGadget(#path, 70, 30, 350, 20, "")
ButtonGadget(#OK, 10, 70, 90, 30, "OK")
ButtonGadget(#Abort, 110, 70, 120, 30, "Abbrechen")
ButtonGadget(#Requester, 240, 70, 110, 30, "Durchsuchen....")
ButtonGadget(#Requester2, 360, 70, 130, 30, "Ordner Finden....")
EndIf
EndIf
EndProcedure
Open_Fenster()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_EventGadget
GadgetID = EventGadgetID()
Select GadgetID
Case #OK
If Len(GetExtensionPart(GetGadgetText(#Path))) > 0
RunProgram(GetGadgetText(#Path))
Else
RunProgram("explorer",GetGadgetText(#Path),"")
EndIf
End
Case #Abort
End
Case #Requester
SetGadgetText(#Path,OpenFileRequester("Datei?","","*.* | *.*",0))
Case #Requester2
SetGadgetText(#Path,PathRequester("Ordner?",""))
EndSelect
EndSelect
Until Event = #PB_EventCloseWindow
End