Marco van de Voort wrote:
{$mode objfpc}{$H+}
uses
   comobj;
var
   vsound: olevariant;
   s: string;
begin
   vsound := createoleobject('SAPI.SpVoice');
   writeln('playing using literal');
   vsound.speak('hello world');
   writeln('ok (press enter)');
   readln;
   writeln('now playing using a string var');
   s := 'hello world';
   vsound.speak(s);
   writeln('ok (press enter)');
   readln;
end.

I've been thinking of adding some interesting code snippets to the examples
of the winunits package (to which comobj belongs). Do you mind if I add this
to SVN ? (lGPL licensed)

Of course not. go ahead.


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to