掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
ActivePerlの標準入出力の操作 (ID:33430)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
doscommand.pas(http://maxxdelphisite.free.fr/)を使用しているのですが、ActivePerl 5.10の標準入出力が上手く操作できません。 他のツールは大体上手くいくのですが、ActivePerlは特殊なのでしょうか? アドバイスよろしくお願いします。 test.pl ------------ print "Start"; while(<>){ print "Loop"; } print "End"; ------------ unit1.pas Button1で、test.pl実行 Button2で、perlの標準入力にEdit2の内容を送信 Button3で、ファイル終端記号送信 標準出力は、Memo1にされます。 DosCommand1のInputToOutputは、True。ReturnCodeは、rcCRLFに設定。 --------------------------- procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Lines.Add('perl.exe test.pl'); DosCommand1.CommandLine := 'perl.exe test.pl'; DosCommand1.Execute; end; procedure TForm1.Button2Click(Sender: TObject); begin DosCommand1.SendLine(Edit2.Text, True); end; procedure TForm1.FormShow(Sender: TObject); begin DosCommand1.OutputLines := Memo1.Lines; end; procedure TForm1.Button3Click(Sender: TObject); begin DosCommand1.SendLine(#$1A, True); end;
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.