Here is tutorial to add a **Talking Calculator** in right click context menu without any software for your Windows 7 or any version of Windows PC.

You might be interested on other similar automated voice oriented tutorial using VB scripts, like:

- Your computer will greet you with current time and date on startup
- Your computer will shut down from a right click option with custom speech
- Your computer will speak the current time from right click menu

Let us proceed on how to make your *Windows 7 Talking Calculator*.

Here is the screenshot:

## Creating the Talking Calculator VB Script

We have modified to add voice function to a existent VB Script calculator created by an unknown developer. Please let us know his / her name, we will give the credit for the Calculator function. We have added the voice function and all other things.

Open Notepad. Write the following things for making your **Talking Calculator**:

Set wshshell=wscript.createobject(“wscript.shell”)

Set Sapi = Wscript.CreateObject(“SAPI.SpVoice”)

set ObjVoice = CreateObject(“SAPI.SpVoice”)

Dim msg,input

Sapi.speak “Choose System of Calculation and hit OK”

msg = “Choose System of Equations:” & vbCR

set ObjVoice = CreateObject(“SAPI.SpVoice”)

ObjVoice.Speak StrText

msg = msg & “” & vbCR

msg = msg & “1. Multiplication ” & vbCR

msg = msg & “2. Addition ” & vbCR

msg = msg & “3. Division ” & vbCR

msg = msg & “4. Subtraction ” & vbCR

msg = msg & “5. Absolute Value ” & vbCR

msg = msg & “6. Raising to a Power” & vbCRinput = InputBox(msg,”Calculator Main Menu”)

SdrText=(“You have chosen ” + input)

Select Case inputcase “1”

Dim a, b, sum

Sapi.speak “Input your first number to be multiplied and hit OK”

a=inputbox(“Input your first number to be multiplied.”, “Multiplication- First Number”, “Enter your number”)

Sapi.speak “Input your second number to be multiplied and hit OK”

b=inputbox(“Input your second number to be multiplied.”, “Multiplication-Second Number”, “Enter your number”)

if not isnumeric (a) then

a = false

end if

If a = vbCancel then

wscript.quit

end if

if not isnumeric (b) then

b = false

end if

If b = vbCancel then

wscript.quit

end if

Sapi.speak “The product of the two digits you entered is”

c=msgbox(“Your Answer: “& a * b, vbInformation, “Product”)case “2”

Sapi.speak “Input your first number to be Added and hit OK”

a=inputbox(“Input your first value to be added.”, “Addition- First Value”, “Enter your number”)

Sapi.speak “Input your second number to be Added and hit OK”

b=inputbox(“Input your second value to be added.”, “Addition- Second Value”, “Enter your number”)

if not isnumeric (a) then

a = false

end if

If a = vbCancel then

wscript.quit

end if

if not isnumeric (b) then

b = false

end if

If b = vbCancel then

wscript.quit

end if

sum= Cdbl (a) + Cdbl(b)

Sapi.speak “The sum of the two digits you entered is”

MsgBox “Your Answer: ” & sum, vbInformation, “Sum”case “3”

Sapi.speak “Input the number to be divided and hit OK”

a=inputbox(“Input your first number to be divided.”, “Division- First Number”, “Enter your number”)

Sapi.speak “Enter the digit you want to divide by and hit OK”

b=inputbox(“Input your second number to be divided.”, “Division-Second Number”, “Enter your number”)

if not isnumeric (a) then

a = false

end if

If a = vbCancel then

wscript.quit

end if

if not isnumeric (b) then

b = false

end if

If b = vbCancel then

wscript.quit

end if

Sapi.speak “The result of the two digits you entered is”

c=msgbox(“Your Answer: “& a / b, vbInformation, “Quotient”)case “4”

Sapi.speak “Input the first number to be Subtracted and hit OK”

a=inputbox(“Input your first value to be Subtracted.”, “Subtraction- First Value”, “Enter your number”)

Sapi.speak “Input the second number now and hit OK”

b=inputbox(“Input your second value to be Subtracted.”, “Subtraction- Second Value”, “Enter your number”)

if not isnumeric (a) then

a = false

end if

If a = vbCancel then

wscript.quit

end if

if not isnumeric (b) then

b = false

end if

If b = vbCancel then

wscript.quit

end if

difference= Cdbl (a) – Cdbl(b)

Sapi.speak “The result of the two digits you entered is”

MsgBox “Your Answer: ” & difference, vbInformation, “Difference”case “5”

Sapi.speak “Input the the value you want the absolute value”

a=inputbox(“Input the the value you want the absolute value of.”, “Absolute Value- Input Value”, “Enter your number”)

if not isnumeric (a) then

a = false

end if

If a = vbCancel then

wscript.quit

end if

Sapi.speak “the absolute value is”

msgbox “Your Answer: ” & abs(a), vbInformation, “Absolute Value”case “6”

Sapi.speak “Input the the value you want raised to a power and hit OK”

a=inputbox(“Input the the value you want raised to a power.”, “Base Number- Input Value”, “Enter your number”)

if not isnumeric (a) then

a = false

end if

If a = vbCancel then

wscript.quit

end if

Sapi.speak “Input your the desired exponent as the second value. It can be of, any value from 0 to 10”

b=inputbox(“Input your the desired exponent as the second value (any value from 0 to 10).”, “Exponent- Second Value”, “Enter your number”)

if not isnumeric (b) then

b = false

end if

If b = vbCancel then

wscript.quit

end if

if b = 0 then

msgbox “Your Answer: ” & 1, vbInformation, “Number Raised to an Exponent”

end if

if b = 1 then

msgbox “Your Answer: ” & a, vbInformation, “Number Raised to an Exponent”

end if

if b = 2 then

msgbox “Your Answer: ” & a * a, vbInformation, “Number Raised to an Exponent”

end if

if b = 3 then

msgbox “Your Answer: ” & a * a * a, vbInformation, “Number Raised to an Exponent”

end if

if b = 4 then

msgbox “Your Answer: ” & a * a * a * a, vbInformation, “Number Raised to an Exponent”

end if

if b = 5 then

msgbox “Your Answer: ” & a * a * a * a * a, vbInformation, “Number Raised to an Exponent”

end if

if b = 6 then

msgbox “Your Answer: ” & a * a * a * a * a * a, vbInformation, “Number Raised to an Exponent”

end if

if b = 7 then

msgbox “Your Answer: ” & a * a * a * a * a * a * a, vbInformation, “Number Raised to an Exponent”

end if

if b = 8 then

msgbox “Your Answer: ” & a * a * a * a * a * a * a * a, vbInformation, “Number Raised to an Exponent”

end if

if b = 9 then

msgbox “Your Answer: ” & a * a * a * a * a * a * a * a * a, vbInformation, “Number Raised to an Exponent”

end if

if b = 10 then

msgbox “Your Answer: ” & a * a * a * a * a * a * a * a * a * a, vbInformation, “Number Raised to an Exponent”

end if

End Select

Save the file as Talking Calculator.vbs for the example above and do not forget to change the file type from text to All files from drop down menu in Notepad before saving it. Obviously, you can save with any name you like.

The red texts are what the computer will speak in Talking Calculator option.

Double clicking the file will bring the Talking Calculator.

### Get this Talking Calculator in right click context menu in Windows 7

Place the Talking Calculator vbs file created in the previous step at the root of C drive.

Open Notepad, copy paste the following and modify as per your need:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOTDirectoryBackgroundshellTalking Calculator]

“Icon”=”C:WindowsSystem32Narrator.exe”

“Position”=”Bottom”[HKEY_CLASSES_ROOTDirectoryBackgroundshellTalking Calculatorcommand]

@=”Wscript.exe “C:Talking Calculator.vbs””

Save the file as Add Talking Calculator.reg and do not forget to change the file type from text to All files from drop down menu in Notepad before saving it. Name does not matter here at all. You can save as you like.

Now, double click the reg file and accept the security warnings and you will see the Talking Calculator option in right click context menu when clicked on a folder or any empty place inside folder or Windows 7 desktop.

### Removal of Talking Calculator option from the right click menu:

Add a minus sign before the H starts after the third bracket; like [-HKEY_CLASSES…. to all where there is HKEY and save it (with some good name) as reg file and run it.

Obviously, you might delete the Talking Calculator vbs file manually too.

Talking Calculator will work on Windows 95, Windows 98, Windows NT, Windows 2000, Windows Millennium, Windows XP, Windows Vista, Windows 7, Windows 8.

### Downloads for Talking Calculator from right click tutorial:

As usually all the required files are here for the Talking Calculator option is for your download.

The rar file is password protected, type **thecustomizewindows.com** as the password.