Autor Beitrag
3rdnuss
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 139



BeitragVerfasst: Mo 21.03.05 23:10 
Hallo und guten Abend.

Ich habe ein (kleines) Problem.

Also ich möchte mittels opendialog eine Datei auswählen, die mithilfe von shellexecute ausgeführt werden soll.



Danke schonmal..

Lg Felix
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Mo 21.03.05 23:10 
und was ist jetzt das problem ?

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
3rdnuss Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 139



BeitragVerfasst: Mo 21.03.05 23:37 
Mhh.

Also mit z.B
ausblenden Delphi-Quelltext
1:
2:
opendialog1.execute;
memo1.Lines.LoadFromFile (opendialog1.filename)


geht das ja, aber ich möchte jetzt beispielsweise eine Exe oder (in meinem Fall .vbs) ausführen können.


Lg Felix
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Mo 21.03.05 23:41 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
uses ShellAPI;
...

ShellExecute(0, 'open', PChar(Opendialog1.Filename), '', '', SW_SHOW);

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
3rdnuss Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 139



BeitragVerfasst: Mo 21.03.05 23:47 
ha, cool danke.

Ich hatte auch die selbe Idee, aber es kam dort bloß ein Fehler beim compilieren, hatte wohl das "Pchar" vergessen.


Gute nacht noch :P


Gruß Felix


//EDIT

Ich habe noch eine Frage.

Und zwar wenn ich den oben genannten Code ausführe, öfnnet sich nur das Verzeichnis in dem sich die EXE meines Programmes befindet :(