Tuesday, June 24, 2008
Voice controlled Mouse
Main title Name: “Voice Interface”
Project title Name: “Voice controlled Mouse”
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh.
Date: 15 September, 2007
I am here to share knowledge with other. I am writing about voice interface project. The people who are computer engineer will get help from this project.
Aim of this project:
Using your voice you can control your mouse
Code Details
‘Voice Command Form code……………………………
‘Put this code in Voice command Form that named Main_1.
Private Const VK_Return = &HD
Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Sub Form_Load()
Form1.Show
Dim FileN As String
FileN = App.Path & "\command.txt"
SR.Deactivate
SR.GrammarFromFile FileN
SR.Activate
SR.AutoGain = 99
CMD_List
End Sub
Private Sub SR_PhraseFinish(ByVal flags As Long, ByVal beginhi As Long, ByVal beginlo As Long, ByVal endhi As Long, ByVal endlo As Long, ByVal Phrase As String, ByVal parsed As String, ByVal results As Long)
Debug.Print Phrase
If Trim(Phrase) = "" Then
Exit Sub
Else
Text2.Text = Trim(Phrase)
SelMSG (Phrase)
Process_Message (Trim(Phrase))
End If
End Sub
Function Process_Message(Msg As String)
Select Case (UCase(Msg))
Case ("UP")
Form1.Command2_Click
Case ("DOWN")
Form1.Command5_Click
Case ("LEFT")
Form1.Command4_Click
Case ("RIGHT")
Form1.Command1_Click
Case ("NORMAL")
Form1.Command3_Click
Case ("Click")
keybd_event VK_Return, 0, 0, 0
keybd_event VK_Return, 0, KEYEVENTF_KEYUP, 0
Case ("EXIT")
End
End Select
End Function
Function CMD_List()
Dim TxT As String, Temp As String
Open App.Path & "\commands.txt" For Input As #1
Do Until EOF(1)
Line Input #1, TxT
Temp = Left(TxT, 8)
If Temp = "S=" Then
TxT = Mid(TxT, 9, Len(TxT))
List1.AddItem TxT
End If
Loop
Close #1
End Function
Function SelMSG(Msg As String)
Dim Temp As String
Dim i As Integer
For i = 0 To List1.ListCount
Temp = List1.List(i)
If Trim(UCase(Temp)) = Trim(UCase(Msg)) Then
List1.ListIndex = i
Exit Function
End If
Next
End Function
‘Cursor controller Form code……..
‘Put this code in Cursor Form that named Form1.
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Dim X, Y As Integer
Dim goRight, goUp, goDown, goLeft As Boolean
Public Sub Command1_Click()
Timer1.Enabled = True
Timer2.Enabled = False
Timer3.Enabled = False
Timer4.Enabled = False
End Sub
Public Sub Command2_Click()
Timer2.Enabled = True
Timer1.Enabled = False
Timer3.Enabled = False
Timer4.Enabled = False
End Sub
Public Sub Command3_Click()
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
Timer4.Enabled = False
End Sub
Public Sub Command4_Click()
Timer3.Enabled = True
Timer1.Enabled = False
Timer2.Enabled = False
Timer4.Enabled = False
End Sub
Public Sub Command5_Click()
Timer4.Enabled = True
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
End Sub
Private Sub Form_Load()
X = Form1.Width / 8 - 0.25
Text1.Text = X
Y = Form1.Height / 8
Text2.Text = Y
SetCursorPos X, Y
End Sub
Private Sub Timer1_Timer()
'If X <= 0 Then goLeft = True
'If goLeft Then
X = X + 1
Text1.Text = X
'End If
SetCursorPos X, Y
End Sub
Private Sub Timer2_Timer()
'If Y <= 0 Then goUp = False
'If goUp Then
Y = Y - 1
Text2.Text = Y
'End If
SetCursorPos X, Y
End Sub
Private Sub Timer3_Timer()
'If X >= 1024 Then goRight = True
'If goRight Then
X = X - 1
Text1.Text = X
'End If
SetCursorPos X, Y
End Sub
Private Sub Timer4_Timer()
'If Y >= 786 Then goDown = True
'If goDown Then
Y = Y + 1
Text2.Text = Y
'End If
SetCursorPos X, Y
End Sub
‘Command.txt file………… save as a text file and put in program root directory.
[Grammer]
Type=Cfg
[S]
S=Left
S=Right
S=Up
S=Down
S=Normal
S=Click
S=Exit
Download this Project: www.geocities.com/redu0007/Cnews
Conclusion:
I developed this software that published in Cnews in Bangladesh. I am regular writer of Cnews, Computer Jagat and Computer tomorrow that’s monthly computer journal of Bangladesh.
Sunday, June 22, 2008
Speaking color reorganized project. Its recognize color from any unique color picture.
Aim of this project
Speaking color reorganized project. Its recognize color from any unique color picture.
Main Title: Color Recognition
Project: Color recognition from a unique color picture.
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh.
Date: 5 November, 2007
I am here to share idea with other.
This snippet of code will change the background color of a picture box to reflect the value of the Red, Green and Blue scroll bars and indicated what the color it is: A shade of blue, purple, orange etc.
This code is fairly accurate but right now isn’t able to distinguish brown/tan colors. This code is still in its infancy.
Program Details
Start Here…………………………………
Private Sub cmdexit_Click()
Unload Me
End Sub
Private Sub cmdGo_Click()
'now find out what type of color it is. IE yellow, orange, blue, grey etc...
Dim MyRVal As String
Dim MyGVal As String
Dim MyBVal As String
MyRVal = Brightness(Me.ScrollRed.Value) & "R"
MyGVal = Brightness(Me.ScrollGreen.Value) & "G"
MyBVal = Brightness(Me.ScrollBlue.Value) & "B"
Dim MyWholeColor As String
MyWholeColor = MyRVal & MyGVal & MyBVal
Dim colorname As String
Select Case MyWholeColor
'example: a Dark Red and a Dk Green and a Dark Blue values are similar in color to a dk grey or blk.
Case Is = "DRDGDB"
colorname = "Dk Grey or black"
Case Is = "DRDGMB"
colorname = "Blue"
Case Is = "DRDGLB"
colorname = "Blue"
Case Is = "DRMGDB"
colorname = "Green"
Case Is = "DRMGMB"
colorname = "BlueGreen"
Case Is = "DRMGLB"
colorname = "Blue"
Case Is = "DRLGDB"
colorname = "Green"
Case Is = "DRLGMB"
colorname = "BlueGreen"
Case Is = "DRLGLB"
colorname = "Blue"
Case Is = "MRDGDB"
colorname = "Red"
Case Is = "MRDGMB"
colorname = "Purple"
Case Is = "MRDGLB"
colorname = "Purple"
Case Is = "MRMGDB"
colorname = "Yellow"
Case Is = "MRMGMB"
colorname = "Grey"
Case Is = "MRMGLB"
colorname = "BluePurple"
Case Is = "MRLGDB"
colorname = "Green"
Case Is = "MRLGMB"
colorname = "Green"
Case Is = "MRLGLB"
colorname = "BlueGreen"
Case Is = "LRDGDB"
colorname = "Red"
Case Is = "LRDGMB"
colorname = "RedPurple"
Case Is = "LRDGLB"
colorname = "Purple"
Case Is = "LRMGDB"
colorname = "Orange"
Case Is = "LRMGMB"
colorname = "Pink/Red"
Case Is = "LRMGLB"
colorname = "Purple"
Case Is = "LRLGDB"
colorname = "Yellow"
Case Is = "LRLGMB"
colorname = "Yellow"
Case Is = "LRLGLB"
colorname = "White/Grey"
End Select
TextToSpeech1.Speak ("The color in the picture is " & colorname)
MsgBox ("The color in the picture is " & colorname)
End Sub
Private Sub ScrollBlue_Change()
'change the caption and the back color of the picture
Me.lblblue.Caption = Me.ScrollBlue.Value
Call ChangeBackColor(Me.ScrollRed, Me.ScrollGreen, Me.ScrollBlue)
End Sub
Private Sub ScrollGreen_Change()
'change the caption and the back color of the picture
Me.lblGreen.Caption = Me.ScrollGreen.Value
Call ChangeBackColor(Me.ScrollRed, Me.ScrollGreen, Me.ScrollBlue)
End Sub
Private Sub ScrollRed_Change()
'change the caption and the back color of the picture
Me.lblRed.Caption = Me.ScrollRed.Value
Call ChangeBackColor(Me.ScrollRed, Me.ScrollGreen, Me.ScrollBlue)
End Sub
Private Sub ChangeBackColor(RVal As Integer, GVal As Integer, BVal As Integer)
'change the back color of the picture to reflect the croll bar values
RVal = Me.ScrollRed.Value
GVal = Me.ScrollGreen.Value
BVal = Me.ScrollBlue.Value
Me.Picture1.BackColor = RGB(RVal, GVal, BVal)
End Sub
Public Function Brightness(mycolor As Integer) As String
'see what the brightness of the color is: dark, medium or light
'"D" for Dark, "L" for light and "M" for med
'If R value and G value and B Value are all less than 85 then it is a dk color
'so will probably be either black or a dk grey (Example (50,50,50) would be a dk grey)
'Same goes for R,G and B value greater than 170. The closer the 3 values get to 255, the closer the
'color will be to white.
If mycolor < 86 Then
Brightness = "D"
ElseIf mycolor < 171 Then
Brightness = "M"
Else
Brightness = "L"
End If
End Function
End Here..........................
For help email me: redu0007@yahoo.com
Conclusion
From a unique color picture this program can recognized Color Name.
Using your voice, you can control a key board.
Aim of this project
Using your voice, you can control a key board.
Main Title: Voice Recognition
Project: Voice controlled key board
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh.
Date: 15 November, 2007
I am here to share idea with other.
Operation of this Project
You have to say first “Start” then Start menu will open. Then say left or right. You may say up or down to control cursor position also and then say “Open” or “Ok”. After open a MS word file say “A” to write A. Like this, you can control your key board. This project has some limitations for some accent problem like I or E.
Program Details
Start Here…………………………………
Dim Temp As Variant
Private Const KEYEVENTF_EXTENDEDKEY = &H1
Private Const KEYEVENTF_KEYUP = &H2
Private Const VK_Backspace = &H8
Private Const VK_Tab = &H9
Private Const VK_Shift = &H10
Private Const VK_Control = &H11
Private Const VK_Alter = &H12
Private Const VK_Pause = &H13
Private Const VK_CapsLock = &H14
Private Const VK_Return = &HD
Private Const VK_Lshift = &HA0
Private Const VK_Rshift = &HA1
Private Const VK_Rcontrol = &HA
Private Const VK_Escape = &H1B
Private Const VK_Space = &H20
Private Const VK_End = &H23
Private Const VK_Home = &H24
Private Const VK_Left = &H25
Private Const VK_Up = &H26
Private Const VK_Right = &H27
Private Const VK_Down = &H28
Private Const VK_Insert = &H2D
Private Const VK_Delete = &H2E
Private Const VK_1 = &H61
Private Const VK_2 = &H62
Private Const VK_3 = &H63
Private Const VK_4 = &H64
Private Const VK_5 = &H65
Private Const VK_6 = &H66
Private Const VK_7 = &H67
Private Const VK_8 = &H68
Private Const VK_9 = &H69
Private Const VK_help = &H70 '''any help file open
Private Const VK_0 = &H60
Private Const VK_a = &H41
Private Const VK_b = &H42
Private Const VK_c = &H43
Private Const VK_d = &H44
Private Const VK_e = &H45
Private Const VK_f = &H46
Private Const VK_g = &H47
Private Const VK_h = &H48
Private Const VK_i = &H49
Private Const VK_j = &H4A
Private Const VK_k = &H4B
Private Const VK_l = &H4C
Private Const VK_m = &H4D
Private Const VK_n = &H4E
Private Const VK_o = &H4F
Private Const VK_p = &H50
Private Const VK_q = &H51
Private Const VK_r = &H52
Private Const VK_s = &H53
Private Const VK_t = &H54
Private Const VK_u = &H55
Private Const VK_v = &H56
Private Const VK_w = &H57
Private Const VK_x = &H58
Private Const VK_y = &H59
Private Const VK_z = &H5A
Private Const VK_star = &H6A '*
Private Const VK_plus = &H6B '+
Private Const VK_sub = &H6D '-
Private Const VK_dot = &H6E '.
Private Const VK_b_sls = &H6F '/
Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Type NOTIFYICONDATA
cbSize As Long
hwnd As Long
uId As Long
uFlags As Long
uCallBackMessage As Long
hIcon As Long
szTip As String * 64
End Type
Private Const WM_MOUSEMOVE = &H200
Private Const WM_LBUTTONDOWN = &H201 'Button down
Private Const WM_LBUTTONUP = &H202 'Button up
Private Const WM_LBUTTONDBLCLK = &H203 'Double-click
Private Const WM_RBUTTONDOWN = &H204 'Button down
Private Const WM_RBUTTONUP = &H205 'Button up
Private Const WM_RBUTTONDBLCLK = &H206 'Double-click
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
Private nid As NOTIFYICONDATA
Private Sub Form_Load()
Dim FileN As String
FileN = App.Path & "commands.txt"
SR.Deactivate
SR.GrammarFromFile FileN
SR.Activate
SR.AutoGain = 99
CMD_List
End Sub
Private Sub SR_PhraseFinish(ByVal flags As Long, ByVal beginhi As Long, ByVal beginlo As Long, ByVal endhi As Long, ByVal endlo As Long, ByVal Phrase As String, ByVal parsed As String, ByVal results As Long)
Debug.Print Phrase
If Trim(Phrase) = "" Then
Exit Sub
Else
Text2.Text = Trim(Phrase)
SelMSG (Phrase)
Process_Message (Trim(Phrase))
End If
End Sub
Function Process_Message(Msg As String)
Select Case (UCase(Msg))
Case ("CLOSE")
Call Close_window
Case ("START")
Call Start
Case ("UP")
keybd_event VK_Up, 0, 0, 0 'Key Press
keybd_event VK_Up, 0, KEYEVENTF_KEYUP, 0 'Key Unpress
Case ("DOWN")
keybd_event VK_Down, 0, 0, 0
keybd_event VK_Down, 0, KEYEVENTF_KEYUP, 0
Case ("LEFT")
keybd_event VK_Left, 0, 0, 0
keybd_event VK_Left, 0, KEYEVENTF_KEYUP, 0
Case ("RIGHT")
keybd_event VK_Right, 0, 0, 0
keybd_event VK_Right, 0, KEYEVENTF_KEYUP, 0
Case ("OPEN")
keybd_event VK_Return, 0, 0, 0
keybd_event VK_Return, 0, KEYEVENTF_KEYUP, 0
Case ("OK")
keybd_event VK_Return, 0, 0, 0
keybd_event VK_Return, 0, KEYEVENTF_KEYUP, 0
Case ("ONE")
keybd_event VK_1, 0, 0, 0
keybd_event VK_1, 0, KEYEVENTF_KEYUP, 0
Case ("TWO")
keybd_event VK_2, 0, 0, 0
keybd_event VK_2, 0, KEYEVENTF_KEYUP, 0
Case ("THREE")
keybd_event VK_3, 0, 0, 0
keybd_event VK_3, 0, KEYEVENTF_KEYUP, 0
Case ("FOUR")
keybd_event VK_4, 0, 0, 0
keybd_event VK_4, 0, KEYEVENTF_KEYUP, 0
Case ("FIVE")
keybd_event VK_5, 0, 0, 0
keybd_event VK_5, 0, KEYEVENTF_KEYUP, 0
Case ("SIX")
keybd_event VK_6, 0, 0, 0
keybd_event VK_6, 0, KEYEVENTF_KEYUP, 0
Case ("SEVEN")
keybd_event VK_7, 0, 0, 0
keybd_event VK_7, 0, KEYEVENTF_KEYUP, 0
Case ("EIGHT")
keybd_event VK_8, 0, 0, 0
keybd_event VK_8, 0, KEYEVENTF_KEYUP, 0
Case ("NINE")
keybd_event VK_9, 0, 0, 0
keybd_event VK_9, 0, KEYEVENTF_KEYUP, 0
Case ("ZERO")
keybd_event VK_0, 0, 0, 0
keybd_event VK_0, 0, KEYEVENTF_KEYUP, 0
Case ("A")
keybd_event VK_a, 0, 0, 0
keybd_event VK_a, 0, KEYEVENTF_KEYUP, 0
Case ("B")
keybd_event VK_b, 0, 0, 0
keybd_event VK_b, 0, KEYEVENTF_KEYUP, 0
Case ("C")
keybd_event VK_c, 0, 0, 0
keybd_event VK_c, 0, KEYEVENTF_KEYUP, 0
Case ("D")
keybd_event VK_d, 0, 0, 0
keybd_event VK_d, 0, KEYEVENTF_KEYUP, 0
Case ("E")
keybd_event VK_e, 0, 0, 0
keybd_event VK_e, 0, KEYEVENTF_KEYUP, 0
Case ("F")
keybd_event VK_f, 0, 0, 0
keybd_event VK_f, 0, KEYEVENTF_KEYUP, 0
Case ("G")
keybd_event VK_g, 0, 0, 0
keybd_event VK_g, 0, KEYEVENTF_KEYUP, 0
Case ("H")
keybd_event VK_h, 0, 0, 0
keybd_event VK_h, 0, KEYEVENTF_KEYUP, 0
Case ("I")
keybd_event VK_i, 0, 0, 0
keybd_event VK_i, 0, KEYEVENTF_KEYUP, 0
Case ("J")
keybd_event VK_j, 0, 0, 0
keybd_event VK_j, 0, KEYEVENTF_KEYUP, 0
Case ("k")
keybd_event VK_k, 0, 0, 0
keybd_event VK_k, 0, KEYEVENTF_KEYUP, 0
Case ("L")
keybd_event VK_l, 0, 0, 0
keybd_event VK_l, 0, KEYEVENTF_KEYUP, 0
Case ("M")
keybd_event VK_m, 0, 0, 0
keybd_event VK_m, 0, KEYEVENTF_KEYUP, 0
Case ("N")
keybd_event VK_n, 0, 0, 0
keybd_event VK_n, 0, KEYEVENTF_KEYUP, 0
Case ("O")
keybd_event VK_o, 0, 0, 0
keybd_event VK_o, 0, KEYEVENTF_KEYUP, 0
Case ("P")
keybd_event VK_p, 0, 0, 0
keybd_event VK_p, 0, KEYEVENTF_KEYUP, 0
Case ("Q")
keybd_event VK_q, 0, 0, 0
keybd_event VK_q, 0, KEYEVENTF_KEYUP, 0
Case ("R")
keybd_event VK_r, 0, 0, 0
keybd_event VK_r, 0, KEYEVENTF_KEYUP, 0
Case ("S")
keybd_event VK_s, 0, 0, 0
keybd_event VK_s, 0, KEYEVENTF_KEYUP, 0
Case ("T")
keybd_event VK_t, 0, 0, 0
keybd_event VK_t, 0, KEYEVENTF_KEYUP, 0
Case ("U")
keybd_event VK_u, 0, 0, 0
keybd_event VK_u, 0, KEYEVENTF_KEYUP, 0
Case ("V")
keybd_event VK_v, 0, 0, 0
keybd_event VK_v, 0, KEYEVENTF_KEYUP, 0
Case ("W")
keybd_event VK_w, 0, 0, 0
keybd_event VK_w, 0, KEYEVENTF_KEYUP, 0
Case ("X")
keybd_event VK_x, 0, 0, 0
keybd_event VK_x, 0, KEYEVENTF_KEYUP, 0
Case ("Y")
keybd_event VK_y, 0, 0, 0
keybd_event VK_y, 0, KEYEVENTF_KEYUP, 0
Case ("Z")
keybd_event VK_z, 0, 0, 0
keybd_event VK_z, 0, KEYEVENTF_KEYUP, 0
Case ("CAPS")
keybd_event VK_CapsLock, 0, 0, 0
keybd_event VK_CapsLock, 0, KEYEVENTF_KEYUP, 0
Case ("BACK")
keybd_event VK_Backspace, 0, 0, 0
keybd_event VK_Backspace, 0, KEYEVENTF_KEYUP, 0
Case ("GAP")
keybd_event VK_Space, 0, 0, 0
keybd_event VK_Space, 0, KEYEVENTF_KEYUP, 0
Case ("EXIT")
End
End Select
End Function
Public Sub Start()
keybd_event VK_Control, 0, 0, 0
keybd_event VK_Escape, 0, 0, 0
keybd_event VK_Down, 0, 0, 0
keybd_event VK_Control, 0, KEYEVENTF_KEYUP, 0
keybd_event VK_Escape, 0, KEYEVENTF_KEYUP, 0
keybd_event VK_Down, 0, KEYEVENTF_KEYUP, 0
End Sub
Public Sub Close_window()
keybd_event VK_Alter, 0, 0, 0
keybd_event VK_F4, 0, 0, 0
keybd_event VK_Alter, 0, KEYEVENTF_KEYUP, 0
keybd_event VK_F4, 0, KEYEVENTF_KEYUP, 0
End Sub
Function CMD_List()
Dim TxT As String, Temp As String
Open App.Path & "commands.txt" For Input As #1
Do Until EOF(1)
Line Input #1, TxT
Temp = Left(TxT, 8)
If Temp = "{{Start}}=" Then
TxT = Mid(TxT, 9, Len(TxT))
List1.AddItem TxT
End If
Loop
Close #1
End Function
Function SelMSG(Msg As String)
Dim Temp As String
Dim i As Integer
For i = 0 To List1.ListCount
Temp = List1.List(i)
If Trim(UCase(Temp)) = Trim(UCase(Msg)) Then
List1.ListIndex = i
Exit Function
End If
Next
End Function
End Here…………………………………
Need Fille :Command.txt
[Grammer]
Type=Cfg
[{{Start}}]
{{Start}}=Start
{{Start}}=Open
{{Start}}=Ok
{{Start}}=Close
{{Start}}=Exit
{{Start}}=Up
{{Start}}=Down
{{Start}}=Left
{{Start}}=Right
{{Start}}=One
{{Start}}=Two
{{Start}}=Three
{{Start}}=Four
{{Start}}=Five
{{Start}}=Six
{{Start}}=Seven
{{Start}}=Eight
{{Start}}=Nine
{{Start}}=Zero
{{Start}}=A
{{Start}}=B
{{Start}}=C
{{Start}}=D
{{Start}}=E
{{Start}}=F
{{Start}}=G
{{Start}}=H
{{Start}}=I
{{Start}}=J
{{Start}}=K
{{Start}}=L
{{Start}}=M
{{Start}}=N
{{Start}}=O
{{Start}}=P
{{Start}}=Q
{{Start}}=R
{{Start}}=S
{{Start}}=T
{{Start}}=U
{{Start}}=V
{{Start}}=W
{{Start}}=X
{{Start}}=Y
{{Start}}=Z
{{Start}}=Caps
{{Start}}=Gap
{{Start}}=Back
For help email me: redu0007@yahoo.com
Conclusion: Some people in our world have some sorrow. """"With out hand how can we control a Computer?"""" Because of that I tried to do some.
Computer will talk to you.
Main Title: Talking Software
Project: Computer will talk to you.
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh.
Date: 28 January, 2008
I am here to share knowledge with other
Aim of this project:
Computer will talk to you. Microsoft voice agent Genie will read your written text.
Needed components:
SAPI 5.1 (Sound application programming interface), Voice agent Genie.exe
(Please dowload SAPI 5.1, Genie.exe from below links)
Program Details:
‘Talker form codes start…………
Option Explicit
Dim char As IAgentCtlCharacterEx
Dim anim As String
Private Sub form_load()
anim = "Genie"
Agent1.Characters.Load anim, anim & ".acs"
Set char = Agent1.Characters(anim)
char.MoveTo 560, 200
char.Show
char.AutoPopupMenu = False
Picture10.Visible = True
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture2.Visible = True
Picture4.Visible = True
Picture6.Visible = True
Picture8.Visible = True
Picture10.Visible = True
End Sub
Private Sub picture1_click()
say Text1.Text
Picture10.Visible = True
End Sub
Private Sub say(text2say As String)
char.Speak text2say
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture2.Visible = True
Picture4.Visible = True
Picture6.Visible = True
Picture8.Visible = True
Picture10.Visible = True
End Sub
Private Sub Picture10_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture10.Visible = False
End Sub
Private Sub Picture2_Click()
char.Speak "Sorry You Must Type Text In To The Text Box To Make Text To Speach"
MsgBox "Sorry You Must Type Text In To The Text Box To Make Text To Speach", vbOKOnly, "Error"
Picture10.Visible = True
End Sub
Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Text1.Text = "" Then
Picture2.Visible = True
Else
Picture2.Visible = False
End If
Picture10.Visible = True
End Sub
Private Sub Picture3_Click()
Text1.Text = ""
Picture10.Visible = True
End Sub
Private Sub Picture4_Mousemove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture2.Visible = True
Picture4.Visible = False
Picture6.Visible = True
Picture10.Visible = True
End Sub
Private Sub Picture5_Click()
About.Show
Picture10.Visible = True
End Sub
Private Sub Picture6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture4.Visible = True
Picture10.Visible = True
Picture6.Visible = False
Picture8.Visible = True
End Sub
Private Sub Picture7_Click()
Unload Me
End
Picture10.Visible = True
End Sub
Private Sub Picture8_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture6.Visible = True
Picture8.Visible = False
Picture10.Visible = True
End Sub
Private Sub Picture9_Click()
char.Stop
Picture10.Visible = True
End Sub
Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture2.Visible = True
Picture4.Visible = True
Picture10.Visible = True
Picture6.Visible = True
Picture8.Visible = True
End Sub
‘Talker form codes end …………
‘About form codes start …………
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture3.Visible = True
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture3.Visible = True
End Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture3.Visible = True
End Sub
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture3.Visible = True
End Sub
Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture3.Visible = True
End Sub
Private Sub Picture1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture3.Visible = True
End Sub
Private Sub Picture2_Click()
Talker.Show
Unload Me
End Sub
Private Sub Picture3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture3.Visible = False
End Sub
‘About form codes end …………
Operation:
You have to write your text in text field. Genie will read your written text.
Other help:
1st install voice agents
2nd install SAPI 5.1 or SAPI 4.00
3rd run this program
Download link:
(Software)
www.geocities.com/b_programing/Text_to_voice_2.zip
(Genie,Merline voice agents)
www.geocities.com/b_programing/Voice_Agent.zip
(SAPI 5.1 or SAPI 4.00)
www.geocities.com/voice_tomorrow
Conclusion:
This project will help you to build talking software.
Robot will recognize Bangla & English Text
Aim of this project
This Project recognized Bangla & English Text and also others languages text can be recognized using this software.
Main Title: Image Recognition
Project: Robot will recognize Bangla & English Text
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh.
Date: 9 October, 2007
I am here to partially share idea with other.
Needed component
Fuzzy technique is applied to teach Text and text recognition algorithm (also based on Fuzzy logic) is applied for detect how much percentages are close the database stored image text.
Program Details
Sorry I didn’t publish this software code for some security of my future project.
For help email me: redu0007@yahoo.com
Working details
In user data area you have to draw a character or text of you own language like Bangla, English, Hindi then teach my program what is that character. For teaching a character (that will stored in a database) and recognized a character from that data base I used Fuzzy technique. If drawn text in user area mach with database storage text image 72% then it will show the character Name and also speak the character accent. Speaking system is applicable for English text only.
Conclusion
I developed this software for my future project virtual reality program where some objects will be real and some objects will be virtual and both will interact using my developing software.
Robot will recognize Objects using Neural Net
Aim of this project
This Project recognized Objects like rectangle, circle, cylinder, square etc
Main Title: Object Recognition
Project: Robot will recognize Objects using Neural Net
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh.
Date: 21 October, 2007
I am here to partially share idea with other.
Used Method
Neural Net method is applied to train objects, In between train objects will recognize by robot. If any new objects, will be train first then it will recognize.
Program Details
Sorry I didn’t publish this Project code for some security of my future project.
For help email me: redu0007@yahoo.com
Working details
1st Objects will be familiarized with Neural Net (Initialization)
2nd Objects image will convert in gray scale (Convert to Gray Scale with 25X25 pixels)
3rd Objects images will train by Neural Net (Training)
4th Input Object image will recognize by Neural Net
Limitation
Require time to train for new Objects.
Conclusion
I developed this software for my future project virtual reality program where some objects will be real and some objects will be virtual and both will interact using my developing software.
Unique colors counter for any picture.
Aim of this project
This Project count unique color from any image.
Main Title: Image Recognition
Project: Unique colors counter for any picture.
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh.
Date: 30 October, 2007
I am here to share idea with other.
Program Details
Start Here…………………………………
Option Explicit
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _
lpvDest As Any, lpvSource As Any, ByVal cbCopy As Long)
Private Type SAFEARRAYBOUND
cElements As Long
lLbound As Long
End Type
Private Type SAFEARRAY2D
cDims As Integer
fFeatures As Integer
cbElements As Long
cLocks As Long
pvData As Long
Bounds(0 To 1) As SAFEARRAYBOUND
End Type
Private Declare Function VarPtrArray Lib "msvbvm50.dll" Alias "VarPtr" (Ptr() As Any) As Long
Private m_cDib As New cDibSection
Private Sub pLoad(ByVal sFIle As String)
Dim oPic As StdPicture
Set oPic = LoadPicture(sFIle)
m_cDib.CreateFromPicture oPic
picImage.Picture = oPic
lblSize.Caption = sFIle & " (" & m_cDib.Width & " x " & m_cDib.Height & ")"
End Sub
Private Sub cmdLoad_Click()
Dim cD As New GCommonDialog
Dim sFIle As String
If (cD.VBGetOpenFileName( _
Filename:=sFIle, _
Filter:="All Picture Files (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|Bitmaps (*.BMP)|*.BMP|JPEGs (*.JPG)|*.JPG|GIFs (*.GIF)|*.GIF|All Files (*.*)|*.*", _
Owner:=Me.hwnd)) Then
pLoad sFIle
End If
End Sub
Private Sub cmdCount_Click()
Dim i As Long
Dim cGreen(0 To 255) As cIndexCollection2
For i = 0 To 255
Set cGreen(i) = New cIndexCollection2
cGreen(i).AllocationSize = 32
Next i
Dim tSA As SAFEARRAY2D
Dim bDib() As Byte
With tSA
.cbElements = 1
.cDims = 2
.Bounds(0).cElements = m_cDib.Height
.Bounds(0).lLbound = 0
.Bounds(1).cElements = m_cDib.BytesPerScanLine
.Bounds(1).lLbound = 0
.pvData = m_cDib.DIBSectionBitsPtr
End With
CopyMemory ByVal VarPtrArray(bDib()), VarPtr(tSA), 4
Dim x As Long, y As Long, xEnd As Long
Dim lC As Long, lGray As Long
Dim lInsertIndex As Long
xEnd = (m_cDib.Width - 1) * 3
For x = 0 To xEnd Step 3
For y = 0 To m_cDib.Height - 1
lC = bDib(x, y) + bDib(x + 2, y) * &H100&
If (cGreen(bDib(x + 1, y)).BinarySearch(lC, lInsertIndex) = 0) Then
cGreen(bDib(x + 1, y)).Add lC, lInsertIndex
End If
Next y
Next x
CopyMemory ByVal VarPtrArray(bDib()), 0&, 4
lC = 0
For i = 0 To 255
lC = lC + cGreen(i).Count
Next i
'MsgBox "The number of unique colours in this image is " & lC, vbInformation
Label3.Caption = lC
SSS1.Speak ("The number of unique colours in this image is " & lC)
End Sub
Private Sub Form_Load()
Dim sFIle As String
sFIle = App.Path
If (Right$(sFIle, 1) <> "") Then sFIle = sFIle & ""
sFIle = sFIle & "RED.jpg"
pLoad sFIle
End Sub
End Here…………………………
Used three modules
1. cDibsection.cls Author: Steve McMahon
2. cIndexcollection2.cls
3. GCommondialog.cls Author: Steve McMahon based on original by Bruce McKinney
For help email me: redu0007@yahoo.com
Conclusion
Form any image or object how many unique colors are present some time we need to know in our robotic project that will be use for color detection.
Robot’s speaking program
Main Title: Voice Interface
Project: Robot’s speaking program
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh
Date: 25 September, 2007
I am here to share knowledge with other. I am writing about voice interface codes.
Aim of this project
Write in text box whatever wants to learn pronunciation of English words. Robot can speaks to human using these codes.
Needed component
Sapi.dll file (if not download from Microsoft)
Program codes
'Need a sapi.dll library file
Public Speech As SpVoice
Private Sub Command1_Click()
Set Speech = New SpVoice
If Text1 = "" Then
MsgBox ("Dear put something in text box to speak"): Exit Sub
End If
Speech.Speak Text1.Text
End Sub
Private Sub Command2_Click()
Text1 = ""
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
End Sub
Conclusion
These codes are generally used to speak English words with help of SAPI. I used it to speak my robot “Bangla Manob” that achieved National & International Award.
Robot Arms Controller Stepper Motor
Main Title: Hardware Interface
Project: Robot Arms Controller Stepper Motor.
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh.
Date: 24 September, 2007
I am here to share knowledge with other
Aim of this project
Using Computer you can control a stepper motor. This concept can be used for robot walking or arms movement, door opening, Machineries control etc.
Needed components
Uni-polar Stepper Motor, 1K Resistor, Transistor (TIP110), Diode (1N4001), D25 connector with wire (printer port connector), +12v Power supply.
Circuit details
Connect D25 connector pin 2 to the circuit Pin 2 and D25 connector pin 3 to the circuit Pin 3 so on. Circuit Ground, must connect to D25 connector pin 18 ~25. Transistor is used to switch Stepper motor coils. Use Uni- polar stepper motor that has 5 wires. One wire is common source and other connected to ground. Transistor is using to select which coil should be grounded. Diodes are use for guide corresponding transistor. Need to fiddle with coil’s wire to get the exact order. Incorrect order will cause the motor to either step irregularly, or not at all. Depend on Motor and transistor supply voltage may change. (see Uni-polar Stepper Motor circuit)
Program Details
Public Port, X, Y As Integer
Private Declare Function Inp Lib "inpout32.dll" Alias "Inp32" (ByVal PortAddress As Integer) As Integer
Private Declare Sub Out Lib "inpout32.dll" Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)
Public Sub Command1_Click()
Timer1.Enabled = True
Timer2.Enabled = False
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
Timer2.Enabled = True
End Sub
Private Sub Command3_Click()
Timer1.Enabled = False
Timer2.Enabled = False
End Sub
Private Sub Command4_Click()
Out Port, 0
End
End Sub
Private Sub Form_Load()
Port = &H378 ' LPT1 Port Address
Out Port, 0
X = 0
Y = 0
Text1.Text = Y
End Sub
Private Sub Timer1_Timer()
If Y = 360 Then
Y = 0
End If
Out Port, X + 1 'Send signal to Pin 2 (D25 Connector)
Out Port, X + 2 'Send signal to Pin 3 (D25 Connector)
Out Port, X + 4 'Send signal to Pin 4 (D25 Connector)
Out Port, X + 8 'Send signal to Pin 5 (D25 Connector)
Y = Y + 1
Text1.Text = Y
End Sub
Private Sub Timer2_Timer()
If Y = 0 Then
Y = Y
Y = 360
End If
Out Port, X + 8 'Send signal to Pin 5 (D25 Connector)
Out Port, X + 4 'Send signal to Pin 4 (D25 Connector)
Out Port, X + 2 'Send signal to Pin 3 (D25 Connector)
Out Port, X + 1 'Send signal to Pin 2 (D25 Connector)
Y = Y - 1
Text1.Text = Y
End Sub
Operation
In controller window has some buttons like “Left Move”, “Right Move”, “Stop” and “End”. Press buttons to control the uni-polar stepper motor.
Conclusion
I developed this circuit and program code that published by Computer Jagat in Bangladesh, 2006.
Shutdown your PC using a Cellphone / Telephone
Main Title: Modem Interface
Project: Shutdown PC using a phone
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh.
Date: 19 September, 2007
Just share programming knowledge to the world
Aim of this project:
Shutdown PC using a phone
Needed components:
Modem, a telephone set
Program code
Option Explicit
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Const WM_COMMAND = &H111
Private Const WM_USER = &H400
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
'These 4 APIs jointly can used to find Class Name of your required Application
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function SetActiveWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Const SW_RESTORE = 9
Private Const SW_NORMAL = 1
Private Const SW_SHOW = 5
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
'keybd_event API call constants
Private Const VK_SHIFT = &H10
Private Const VK_LSHIFT = &HA0
Private Const VK_RSHIFT = &HA1
Private Const VK_RCONTROL = &HA3
Private Const VK_CONTROL = &H11
Private Const KEYEVENTF_EXTENDEDKEY = &H1
Private Const KEYEVENTF_KEYUP = &H2
Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
'user defined type required by Shell_NotifyIcon API call
Private Type NOTIFYICONDATA
cbSize As Long
hwnd As Long
uId As Long
uFlags As Long
uCallBackMessage As Long
hIcon As Long
szTip As String * 64
End Type
'constants required by Shell_NotifyIcon API call:
Private Const NIM_ADD = &H0
Private Const NIM_MODIFY = &H1
Private Const NIM_DELETE = &H2
Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4
Private Const WM_MOUSEMOVE = &H200
Private Const WM_LBUTTONDOWN = &H201 'Button down
Private Const WM_LBUTTONUP = &H202 'Button up
Private Const WM_LBUTTONDBLCLK = &H203 'Double-click
Private Const WM_RBUTTONDOWN = &H204 'Button down
Private Const WM_RBUTTONUP = &H205 'Button up
Private Const WM_RBUTTONDBLCLK = &H206 'Double-click
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
Private nid As NOTIFYICONDATA
Dim tm As Long
Private Sub Combo1_Click()
On Error GoTo ER:
If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
MSComm1.CommPort = Combo1.ListIndex + 1
MSComm1.PortOpen = True
Exit Sub
ER:
MsgBox Err.Description
End Sub
Private Sub Form_Load()
Dim portNum As Integer
portNum = CInt(GetSetting("CallMon", "General", "Port", 1))
Dim txt
txt = GetSetting("CallMon", "AppClasses", "Class" & 100)
With MSComm1
.Handshaking = 2 - comRTS
.RThreshold = 1
.RTSEnable = True
.Settings = "9600,n,8,1"
.SThreshold = 1
End With
With Combo1
.AddItem "COM 1"
.AddItem "COM 2"
.AddItem "COM 3"
.AddItem "COM 4"
.AddItem "COM 5"
.AddItem "COM 6"
.AddItem "COM 7"
.AddItem "COM 8"
.ListIndex = portNum - 1
End With
'Used for minimising application to System Tray as an Icon
With nid
.cbSize = Len(nid)
.hwnd = Me.hwnd
.uId = vbNull
.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
.uCallBackMessage = WM_MOUSEMOVE
.hIcon = Me.Icon
.szTip = "Call Monitor" & vbNullChar
End With
Shell_NotifyIcon NIM_ADD, nid
End Sub
Private Sub Form_Resize()
If Me.WindowState = vbMinimized Then Me.Hide
End Sub
Private Sub Form_Unload(Cancel As Integer)
Shell_NotifyIcon NIM_DELETE, nid
SaveSetting "CallMon", "General", "Port", CStr(Combo1.ListIndex + 1)
End Sub
Private Sub mnuExit_Click()
Unload Me
End Sub
Private Sub MSComm1_OnComm()
Dim rcv As String
If MSComm1.CommEvent = comEvReceive Then
rcv = MSComm1.Input
If rcv = vbCrLf + "RING" + vbCrLf Then
If Timer1.Enabled = False Then
Call Turnoff
Timer1.Enabled = True
End If
tm = 0
End If
End If
End Sub
Private Sub Timer1_Timer()
tm = tm + 1
If tm > 10 Then
Me.Icon = Image1.Picture
nid.hIcon = Me.Icon
Shell_NotifyIcon NIM_MODIFY, nid
End If
End Sub
Private Sub Turnoff()
List1.AddItem "CALL @” & Time
Label3.Caption = Date & Time
Label3.Caption = "Your Computer is shutting down"
Shell "shutdown -s -f -t 0" ‘windows xp
'Shell "c:windowsrundll.exe user.exe,exitwindows" ‘windows 98
End Sub
Download this Project: www.geocities.com/redu0007
Operation:
Install modem in your computer than connect your telephone wire to modem. Develop the following program in visual basic or download the program and run it in your PC then call from another telephone to your connected modem phone. Computer will be shutdown. Check code, there is a difference between windows XP, Windows 98 codes for shutdown
Conclusion:
I developed this program that published by Computer JAGAT in Bangladesh, September 2007.
Voice Control windows
Main Title: Voice Interface
Project: Voice Control windows programming code
Developer: Md. Redwanur Rahman
Location: Dhaka, Bangladesh.
Date: 19 September, 2007
To develop computer programming knowledge follow the below voice control windows code.
Aim of this project:
You can control windows using this program
Needed components:
Microphone, SAPI 4 or SAPI 5.1 (Sound application programming Interface)
Use below Components control from SAPI
1. Microsoft Direct speech recognition
2. Microsoft Direct text-to-Speech
For active this two components go to visual Basic Project menu then components then control tab.
Program Details:
Dim Temp As Variant
Private Const KEYEVENTF_EXTENDEDKEY = &H1
Private Const KEYEVENTF_KEYUP = &H2
Private Const VK_Backspace = &H8
Private Const VK_Tab = &H9
Private Const VK_Shift = &H10
Private Const VK_Control = &H11
Private Const VK_Alter = &H12
Private Const VK_Pause = &H13
Private Const VK_CapsLock = &H14
Private Const VK_Return = &HD
Private Const VK_Lshift = &HA0
Private Const VK_Rshift = &HA1
Private Const VK_Rcontrol = &HA
Private Const VK_Escape = &H1B
Private Const VK_Space = &H20
Private Const VK_End = &H23
Private Const VK_Home = &H24
Private Const VK_Left = &H25
Private Const VK_Up = &H26
Private Const VK_Right = &H27
Private Const VK_Down = &H28
Private Const VK_Insert = &H2D
Private Const VK_Delete = &H2E
Private Const VK_F1 = &H70
Private Const VK_F2 = &H71
Private Const VK_F3 = &H72
Private Const VK_F4 = &H73
Private Const VK_F5 = &H74
Private Const VK_F6 = &H75
Private Const VK_F7 = &H76
Private Const VK_F8 = &H77
Private Const VK_F9 = &H78
Private Const VK_F10 = &H79
Private Const VK_F11 = &H7A
Private Const VK_F12 = &H7B
Private Const VK_NumLock = &H90
Private Const VK_ScrollLock = &H91
Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Sub Form_Load()
Dim FileN As String
FileN = App.Path & "commands.txt"
SR.Deactivate
SR.GrammarFromFile FileN
SR.Activate
SR.AutoGain = 99
CMD_List
End Sub
Private Sub SR_PhraseFinish(ByVal flags As Long, ByVal beginhi As Long, ByVal beginlo As Long, ByVal endhi As Long, ByVal endlo As Long, ByVal Phrase As String, ByVal parsed As String, ByVal results As Long)
Debug.Print Phrase
If Trim(Phrase) = "" Then
Exit Sub
Else
Text2.Text = Trim(Phrase)
SelMSG (Phrase)
Process_Message (Trim(Phrase))
End If
End Sub
Function Process_Message(Msg As String)
Select Case (UCase(Msg))
Case ("CLOSE")
Call Close_window
Case ("START")
Call Start
Case ("GO")
Call Start
Case ("UP")
keybd_event VK_Up, 0, 0, 0
keybd_event VK_Up, 0, KEYEVENTF_KEYUP, 0
Case ("DOWN")
keybd_event VK_Down, 0, 0, 0
keybd_event VK_Down, 0, KEYEVENTF_KEYUP, 0
Case ("LEFT")
keybd_event VK_Left, 0, 0, 0
keybd_event VK_Left, 0, KEYEVENTF_KEYUP, 0
Case ("RIGHT")
keybd_event VK_Right, 0, 0, 0
keybd_event VK_Right, 0, KEYEVENTF_KEYUP, 0
Case ("OPEN")
keybd_event VK_Return, 0, 0, 0
keybd_event VK_Return, 0, KEYEVENTF_KEYUP, 0
Case ("OK")
keybd_event VK_Return, 0, 0, 0
keybd_event VK_Return, 0, KEYEVENTF_KEYUP, 0
Case ("EXIT")
End
End Select
End Function
Public Sub Start()
keybd_event VK_Control, 0, 0, 0
keybd_event VK_Escape, 0, 0, 0
keybd_event VK_Down, 0, 0, 0
keybd_event VK_Control, 0, KEYEVENTF_KEYUP, 0
keybd_event VK_Escape, 0, KEYEVENTF_KEYUP, 0
keybd_event VK_Down, 0, KEYEVENTF_KEYUP, 0
End Sub
Public Sub Close_window()
keybd_event VK_Alter, 0, 0, 0
keybd_event VK_F4, 0, 0, 0
keybd_event VK_Alter, 0, KEYEVENTF_KEYUP, 0
keybd_event VK_F4, 0, KEYEVENTF_KEYUP, 0
End Sub
Function CMD_List()
Dim TxT As String, Temp As String
Open App.Path & "commands.txt" For Input As #1
Do Until EOF(1)
Line Input #1, TxT
Temp = Left(TxT, 8)
If Temp = "S=" Then
TxT = Mid(TxT, 9, Len(TxT))
List1.AddItem TxT
End If
Loop
Close #1
End Function
Function SelMSG(Msg As String)
Dim Temp As String
Dim i As Integer
For i = 0 To List1.ListCount
Temp = List1.List(i)
If Trim(UCase(Temp)) = Trim(UCase(Msg)) Then
List1.ListIndex = i
Exit Function
End If
Next
End Function
“Command.txt” file
[Grammer]
Type=Cfg
[S]
S=Start
S=Go
S=Up
S=Down
S=Left
S=Right
S=Open
S=Ok
S=Close
S=Exit
Past this “command.txt” file in this program main directory.
Download this Project: www.geocities.com/redu0007
Operation:
Say “Start” then start menu will open, then say “Up” or “Down” it will select a program or say “Left” or “Right”, select your desire program then say “Ok” or “Open”. Enjoy this program.
Conclusion:
I developed this program that published by Computer JAGAT in Bangladesh, May, 2006.
Wednesday, June 4, 2008
Redwan's Program Download List
Redwan's Programs for Computer Jagat
Voice Key Board
Text To Voice
Say Computer will repeat
Parallel Port Details
ABC Learner
Redwan's Programs for C News
Voice Controlled Light.
Voice Controlled Mouse.
Voice Controlled Stepper Motor.
Voice & Color.
Text to voice
Talk & write.
Voice Browser
Voice Commanding Robot Robocommand
Voice Key Board
Text To Voice
Say Computer will repeat
Parallel Port Details
ABC Learner
Redwan's Programs for C News
Voice Controlled Light.
Voice Controlled Mouse.
Voice Controlled Stepper Motor.
Voice & Color.
Text to voice
Talk & write.
Voice Browser
Voice Commanding Robot Robocommand
Sunday, June 1, 2008
Want to learn more about interface and Voice recognition Projects.
Want to learn more about interface and Voice recognition Projects.
Please Visit:
www.geocities.com/redu0007
Bangladesh Computer Journal “Computer Jagat”: www.geocities.com/b_programing
Bangladeshi Computer Journal “C News”: www.geocities.com/redu0007/cnews
Bangladeshi Computer Journal “Computer Tomorrow”: www.geocities.com/voice_tomorrow
Please Visit:
www.geocities.com/redu0007
Bangladesh Computer Journal “Computer Jagat”: www.geocities.com/b_programing
Bangladeshi Computer Journal “C News”: www.geocities.com/redu0007/cnews
Bangladeshi Computer Journal “Computer Tomorrow”: www.geocities.com/voice_tomorrow
Subscribe to:
Posts (Atom)