jecksom
asked on
Thaddy> SAPI
Hello !
Can you show me delphi source of Tvcommand from SAPI 4,
i always get error on "Vcommand1.AddCommand(" :( ,
or maybe anyone known solution also.
Jecksom.
Can you show me delphi source of Tvcommand from SAPI 4,
i always get error on "Vcommand1.AddCommand(" :( ,
or maybe anyone known solution also.
Jecksom.
If Olevariant(Vcommand).AddCo mmand(Acom mand) works do I get the points?
ASKER
I'll better show my source :
var
gmymenu:longint;
procedure TForm1.FormCreate(Sender: TObject);
begin
Vcommand1.Initialized := 1;
gMymenu := Vcommand1.MenuCreate['Proj ect1', 'state1', 4];
Vcommand1.Enabled := 1;
Vcommand1.AddCommand(gMyme nu, 1, 'red', 'when you say' + 'red', 'listen list',0, '');///ERROR
Vcommand1.AddCommand(gMyme nu, 1, 'blue', 'when you say' + 'blue', 'listen list', 0, '');
Vcommand1.AddCommand(gMyme nu, 1, 'green', 'when you say' + 'green', 'listen list', 0, '');
Vcommand1.Activate(gMymenu );
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
Vcommand1.ReleaseMenu(gMym enu);
end;
I've just transfered it from VB source . "///ERROR" - Access Violation .... Xcommand.dll,
maybe you know why ? or maybe i'm doing wrong way ?
Jecksom
var
gmymenu:longint;
procedure TForm1.FormCreate(Sender: TObject);
begin
Vcommand1.Initialized := 1;
gMymenu := Vcommand1.MenuCreate['Proj
Vcommand1.Enabled := 1;
Vcommand1.AddCommand(gMyme
Vcommand1.AddCommand(gMyme
Vcommand1.AddCommand(gMyme
Vcommand1.Activate(gMymenu
end;
procedure TForm1.FormDestroy(Sender:
begin
Vcommand1.ReleaseMenu(gMym
end;
I've just transfered it from VB source . "///ERROR" - Access Violation .... Xcommand.dll,
maybe you know why ? or maybe i'm doing wrong way ?
Jecksom
ASKER
PS: Vcommand1: TVcommand; from Microsoft Voice Command OCX.
I'll check it this weekend. will be back.
Until then, why not try the ms agent stuff? MS states this will be their (high level) standard for text to speech and speech to text. You don't have to show some not.so.funny characters, they are just part of the spec. the speech engine is, apart from the dragon products, the best I've seen jet.
Until then, why not try the ms agent stuff? MS states this will be their (high level) standard for text to speech and speech to text. You don't have to show some not.so.funny characters, they are just part of the spec. the speech engine is, apart from the dragon products, the best I've seen jet.
ASKER
HI , Dragon dictant ? i didn't checked it myslef , does it based on MS API ? or they have
self designed engine ?
Okay , i'll try MS agent , hope you'll don't forget about my question after weekend .
Best Regards,
Jecksom
self designed engine ?
Okay , i'll try MS agent , hope you'll don't forget about my question after weekend .
Best Regards,
Jecksom
Olevariant(Vcommand1).AddC ommand(gMy menu, 1, 'red', 'when you say' + 'red', 'listen list',0);///NO ERROR , you default to the default!
As explained in first comment, this works (and I tested it too)
As explained in first comment, this works (and I tested it too)
ASKER
Olevariant(Vcommand1).AddC ommand(gMy menu, 1, 'red', 'when you say' + 'red', 'listen list',0); ----> Invalid Typecast at : "Olevariant(Vcommand1).". How i can fix that ?
Oops, forgot to say that I did use it directly, that is, not with an ocx wrapper but directly via the interface.
I create the control almost always via a coXX.Create
look in the *_TLB.PAS file and look for the coClasses section
There you'll find the interfaces that you can create an instance of directly. Then, use them as needed. If you need help, I'll send an example.
I create the control almost always via a coXX.Create
look in the *_TLB.PAS file and look for the coClasses section
There you'll find the interfaces that you can create an instance of directly. Then, use them as needed. If you need help, I'll send an example.
ASKER
Yes ! example would be great !
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yep ! It works ! thanx for your help !
Jecksom.
Jecksom.