strwcmp? :3
How will I be able to read the contents of a LPWSTR?
This is for Speech Recognition. What the user says gets stored in pwszText, is there a way I can read it?Code:hr = pPhrase->GetText(SP_GETWHOLEPHRASE, SP_GETWHOLEPHRASE, FALSE, &pwszText, 0); std::wcout << pwszText << " (" << pParts->Rule.ulId << ") " << std::endl;
Lets say it says "Run Firefox"
Can I make C++ read that and then execute a command depending on what pwszText contains?
"The best way to predict your future is to create it."
Contributions I made:
DirectX E-Books
Hacking Tools
Hacking into a PC
Need Help?
Send me a PM, or send me a email at : aanthonyz10@gmail.com
Click My Dragon:
strwcmp? :3
Ah we-a blaze the fyah, make it bun dem!
This solved my problem:
Code:hr = pPhrase->GetText(SP_GETWHOLEPHRASE, SP_GETWHOLEPHRASE, FALSE, &pwszText, 0); USES_CONVERSION; char * s =(W2A(pwszText)); if(strcmp(s,"run Fire Fox") == 0) {std::cout << "It worked!\n";}
"The best way to predict your future is to create it."
Contributions I made:
DirectX E-Books
Hacking Tools
Hacking into a PC
Need Help?
Send me a PM, or send me a email at : aanthonyz10@gmail.com
Click My Dragon:
My program is specifically designed to only recognize it like this:
run Fire Fox
"The best way to predict your future is to create it."
Contributions I made:
DirectX E-Books
Hacking Tools
Hacking into a PC
Need Help?
Send me a PM, or send me a email at : aanthonyz10@gmail.com
Click My Dragon:
Well do you have a couple of specific kommands?
One thing you can do is have a menu come up simply stating
1=Run furefox
2=xx
3=xx
Then have the user just input a 1,2,3.
I beileve C++ is picky on capped or uncapped variables so I don't know how to tell you how to, unless you have Run Firefox, run firefox, Run FireFox and you know, variations all do the same thing.
My program only runs on voice, so I dont use cin at all
"The best way to predict your future is to create it."
Contributions I made:
DirectX E-Books
Hacking Tools
Hacking into a PC
Need Help?
Send me a PM, or send me a email at : aanthonyz10@gmail.com
Click My Dragon: