Autor Beitrag
barrymoto
Hält's aus hier
Beiträge: 2



BeitragVerfasst: So 13.11.05 01:35 
hallo... ich hab mal eine frage da ich bisher unter keinem thema ne passende antwort gefunden habe...

ich möchte einen ordner/ oder ein programm (is egal)öffnen, is ja kein problem kann man ja mit shellexecute machen
das würde dann so aussehen

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
ShellExecute(Handle,
               'open',
               'C:\Programme',
               nil,
               nil,
               SW_SHOW);


aber jetzt mein problem: das C:\programme möchte ich selbst in dem programm verändern, also zum beispiel dass ich das in eine memo schreibe und diese bei shellexecute dann augelesen wird aber das klappt nicht
zum beispiel so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
ShellExecute(Handle,
               'open',
               'memo1.lines',
               nil,
               nil,
               SW_SHOW);


könnt ihr mir weiterhelfen???

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt
Moderiert von user profile iconChristian S.: Topic aus Neue Einträge / Hinweise / etc. verschoben am Mo 14.11.2005 um 11:06
highhatcompy
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 190

Win2000,Win XP,Linux(SuSE9.2)
Delphi 5 Prof.
BeitragVerfasst: Mo 14.11.05 12:23 
Hallo,
also so sollte es gehen

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
ShellExecute(Handle,  
               'open',  
               PChar(memo1.lines),  
               nil,  
               nil,  
               SW_SHOW);


Bis bald
HHC

_________________
Bist Du ein Programmierer, so wirst Du gegen Computer, Hardwarehersteller und Anwender verlieren. (Quelle: Murphy's Computer-Gesetz)
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mo 14.11.05 13:34 
Hallo,

Lines ist vom Typ TStrings, das wird so nichts.
Wenn der Pfad in der ersten Zeile des Memo steht, dann so
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
  ShellExecute(Handle,
               'open',
               PChar(Memo1.Lines[0]),
               nil,
               nil,
               SW_SHOW);

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
highhatcompy
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 190

Win2000,Win XP,Linux(SuSE9.2)
Delphi 5 Prof.
BeitragVerfasst: Mo 14.11.05 15:43 
user profile iconLannes hat folgendes geschrieben:
Hallo,

Lines ist vom Typ TStrings, das wird so nichts.
Wenn der Pfad in der ersten Zeile des Memo steht, dann so
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
  ShellExecute(Handle,
               'open',
               PChar(Memo1.Lines[0]),
               nil,
               nil,
               SW_SHOW);


Richtig ! :oops: :oops:

_________________
Bist Du ein Programmierer, so wirst Du gegen Computer, Hardwarehersteller und Anwender verlieren. (Quelle: Murphy's Computer-Gesetz)
barrymoto Threadstarter
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Mo 14.11.05 21:02 
cool dnake habt mir sehr geholfen jetzt bin ich weiter mit meinem programm... also eig so gut wie fertig ^^ danke nochmal