hi,
i thought this might be a easy task but i am not able to manage it.
task:
- read an integer value from edit1.text
- start a program.exe (via cmd)
- add +5 to the integer value and send this value to the opened program
what would be the easiest way to do this??
open program and send value
Started by q19, Jun 26 2010 03:18 AM
2 replies to this topic
#1
Posted 26 June 2010 - 03:18 AM
|
|
|
#2
Posted 26 June 2010 - 04:38 AM
The easiest would be to pass the value as a command line parameter. If you need to communicate with the program, you need to know what messaging systems it supports (if it isn't yours) or that you want to implement (if it is).
#3
Posted 06 September 2010 - 01:22 AM
It's not so easy. In Delphi you can use:
MaxX's delphi site - TDosCommand
to execute some command
not compiled but should work ok
MaxX's delphi site - TDosCommand
to execute some command
DosCommand1.CommandLine:='ping google.coml'; DosCommand1.Execute;to receive you must assign and action to event onNewline. For example:
procedure TForm1.DosCommand1cNewLine(Sender: TObject; NewLine: String; OutputType: TOutputType); var num,newnum: Integer; begin num:=StrToInt(NewLine); // process somehow this variable newnum:=num+5; dosc.SendLine(IntToStr(newnum),true); end;
not compiled but should work ok


Sign In
Create Account

Back to top









