Autor Beitrag
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Fr 24.06.05 13:52 
Hallo!

Folgendes Problem:

Mein Proggramm sendet einem anderen wärend per shellexecute den paramter:
Zitat:

C:\Delphi-Programme\K(In Zus. mit T)\TestDatei1.fest

Die Batch
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
@echo off
:loop
if %1.==. goto end
echo %1
shift /1
goto loop
:end
pause
:end

Gibt mir das so zurück
Zitat:
C:\Delphi-Programme\K(In
Zus.
mit
T)\TestDatei.fest


Der ankommende Parameter beim anderen Prog siht so aus:
Zitat:
C:\Delphi-Programme\K(In


Die folgenden paramter sind nicht belget,
Zitat:
C:\Delphi-Programme\K(In
ist also alles was übergeben wird.

Wie kann man dem Abhilfe schaffen?


mfg
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Fr 24.06.05 14:01 
Versuch's mal mit doppelten Anführungszeichen (") um den Dateinamen mit Leerzeichen.

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
Fabian W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Fr 24.06.05 14:05 
ausblenden Delphi-Quelltext
1:
PChar("C:\Delphi-Programme\K(In Zus. mit T)\TestDatei1.fest")					


So?

Vielleicht ist das noch wichtig:

Der string is in ner Variablen: Profilname


Das ganze sieht so aus:

ausblenden Delphi-Quelltext
1:
ShellExecute(Application.Handle, 'open',PChar(extractfilepath(paramstr(0))+'K.exe'), PChar(Form1.Profilname), nil, SW_SHOW);					


Moderiert von user profile iconChristian S.: Quote- durch Delphi-Tags ersetzt.
Moderiert von user profile iconChristian S.: Beiträge zusammengefasst
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Fr 24.06.05 14:11 
user profile iconFabian W. hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
PChar("C:\Delphi-Programme\K(In Zus. mit T)\TestDatei1.fest")					

So?
Nö.

ausblenden Delphi-Quelltext
1:
ShellExecute(Application.Handle, 'open', PChar(extractfilepath(paramstr(0))+'\K.exe'), PChar('"' + Form1.Profilname + '"'), nil, SW_SHOW);					

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
Fabian W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Fr 24.06.05 14:48 
:D Danke! Klappt!