Dear Sir,

This is my final year project. The initial hurdles have been easy to cross but i have been totally confused ever since i began to fine-tune it.

Title: Peedy
Aim: To control the Windows System usin Speech Recognition.
Uses: MS Script Control, MS Agent control

Details:

I am sending the coding of the project along with this email. Basically this is the flow of the program:

The Sub Main() procedure in the CommandDesc module is executed first. Here, the AddFolderCommands function recursively scans the c:\windows\startmenu\programs folder.
All the ".lnk" files found are added as Agent Commands using the AddCommand procedure.
Some other special commands are also added in the Sub Main() procedure.

Uptil here everything works just fine. All the links are stored in a Shortcuts array along with their complete paths. When the user says the name of a program (as it is referred to in its link name), the corresponding link file is ShellExecut-ed and the program runs. 

Some other functions such as ACO, ShowDesktop (thanks to you), Minimize, Maximize, Restore, Destroy, AboutBuddy, Exit, LogOff, Reboot, ShutDown, OpenCD, CloseCD and PlayCD are working just like they should. However, some key functions that would greatly enhance the feasibility of the project are not working at all. This is where I really need your help. 

The commands that are not working are:

1. VoiceOn and VoiceOff
	Peedy listens to user input only when the Scroll Lock key is pressed. This command aims at simulating the ScrollLock keypress to make Peedy listen to the user continuously.  
The scroll lock was controlled easily using SetKeyboardState in the KeyboardFuncs Module but it had no effect on Peedy's listening states.

2. CD Controls
	I want to control the working of the CD ROM drive completely with voice commands. OpenCD and CloseCD open/close the tray and PlayCD begins to play the first audio track. StopCD stops the audio track also. But Pause, Resume, Rewind and Forward were not working.
Pause causes the CD to stop playing and resets the position of the track pointer. Is there some other way to do this?

3. vbStrings
	One of the most important applications would be sending these messages to active windows so that an application does not get stuck requiring user input.I tried to use the SendKeys method like you told me to but there is a problem. Lets say i open Notepad and type out something. Then when I say Destroy, Notepad pops up a window asking "Do you want to save the changes? Yes, No, Cancel". Now when i say "No", Peedy hears it correctly. SendKey send the corresponding vbString to the Notepad window and not to the Pop-up window. Therefore nothing worthwhile takes place, instead the vbNo is typed in the Notepad text window.

4. FilterScript
	Another very important aspect is that of accuracy. When filling up the Shortcut Array with links, all links are added, even many redundant ones which are pointing to Help Files, URLs and Readmes etc. So I wrote a script that would only select the links that are pointing to Exe files and only include them in the Shortcuts Array. However this script is not working and usually gives the error "Expected:')'". Sometimes it gives the error Object not supported for Wscript. Is it necessary to have a Sub Main() in the script? I still have not tried out the CScript method that you told me, but i will tell you the result of it as soon as i find out. The script has been commented and is in the FormLoad event of FrmMain. Putting the script in a seperate file will take longer to execute, the script has to be executed for every link.

5. Execute the current Screensaver
	Current code causes computer to StandBy and does not run the ScreenSaver.


I have been stuck for a very long time on these problems and i really hope you could help me out somewhere. 

Looking forward to your reply.

yours,
Karan



