12-16-2022, 10:01 PM
I have now expanded the program so that you can specify the location of the program. I have programs under both "Programme" and "Program Files". -- By the way, I myself have never created a "Program Files" directory, the installation routines always specify that. I created the "Programme" folder because, for example, Strawberry Perl does not like "Program Files".
Example:
Code: (Select All)
'Externes Programm aufrufen mit Funktion - 15. Dez. 2022
'Korrektur durch Pete bei der Funktion "$" - 16. Dez. 2022
'Ohne "Console" kann "\" nicht eingegeben werden
$Console:Only
Option _Explicit
Declare Function externesProgramm(extern As String) As String
Dim As String externerAufruf
Dim As Integer auswahl
Locate 2, 3
Print "Aufruf externer Programme"
Locate 3, 3
Print "========================="
Locate 5, 3
Print "Bestimmung des Programmortes."
Locate 6, 3
Print "Programme ist: 1 -- Program Files ist 2"
Locate 8, 3
Input "Auswahl: ", auswahl
Locate 10, 3
If auswahl = 1 Then
Input "Externes Programm: ", externerAufruf
Shell _Hide _DontWait "D:\" + Chr$(34) + "Programme" + Chr$(34) + externesProgramm(externerAufruf)
Else
Input "Externes Programm: ", externerAufruf
Shell _Hide _DontWait "D:\" + Chr$(34) + "Program Files" + Chr$(34) + externesProgramm(externerAufruf)
End If
End
Function externesProgramm$ (extern As String)
Dim As String pfad
pfad = extern
externesProgramm = pfad
End Function
Example: