Controlling E9Screen EPC9 Installation 96
RETURN;
END; (* IF *)
TermIO.WriteString( 'response: [' );
TermIO.WriteInt( NewSignature, 0 );
TermIO.WriteString( '] ' );
Count := HIGH( InputString );
IF IOText.Read( MessageFile, Count, ADR( InputString ) ) THEN
TermIO.WriteLine( InputString );
ELSE
(*
If the "response" text is empty, then the command has been
sucessfully processed!
*)
TermIO.WriteLine( 'done.' );
END; (* IF *)
LastSignature := NewSignature;
IF ( NewSignature > Signature ) OR ( NewSignature = 0 ) THEN
Signature := NewSignature + 1;
Dummy := WriteToCommandFile( 'acknowledged' );
END; (* IF *)
END PollForCommands;
PROCEDURE Startup(): BOOLEAN;
VAR
Temp : IOFiles.FileNameType;
Path : IOFiles.FileNameType;
BEGIN
IF CommandFile.IsOpen THEN
Alert.String( 'Command file already open! ' );
RETURN FALSE;
END; (* IF *)
Strings.Assign( Temp, 'E9Screen.exe' );
Strings.Clear( Path );
IF NOT
FileSelect.Select(
Temp,
Path,
'*.*',
FileSelect.ExistingFile + FileSelect.ChangeDirectory,
'Select any file in target E9Screen folder:' )
THEN
RETURN FALSE;
END; (* IF *)