Hack-Addict Master Cheater
Reputation: 0
Joined: 20 Nov 2007 Posts: 287
|
Posted: Sat Dec 15, 2007 3:35 pm Post subject: Ugggh error's (Visual basic) please help |
|
|
Here's the whole code im using, but i don't know why i get error 53, STILL! T_T I'll get an error 76 if the file isent there, but then it creates the file, and dosent have error 76 anymore, just error 53 T_T
Here's the entire code, just so you can get an understanding of what im using
and so you could help...
| Code: | Private Sub Check1_Click()
If Timer2.Enabled = False Then
Timer2.Enabled = True
Else
If Timer2.Enabled = True Then
Timer2.Enabled = False
End If
End If
End Sub
Private Sub Command1_Click()
If Timer1.Enabled = False Then
Timer1.Enabled = True
Command1.Caption = "Auto spamming"
Else
If Timer1.Enabled = True Then
Timer1.Enabled = False
Command1.Caption = "Stopped"
Dim f As Long
f = FreeFile()
Open "C:\saved\Auto spammer.txt" For Output As #f
Print #f, Text1.Text
Close #f
End If
End If
End Sub
Private Sub Command2_Click()
Dim ContentFile
Open "C:\Saved\Auto spammer.txt" For Input As #1
Input #1, ContentFile
Text1.Text = ContentFile
Close #1
Dim Contentfile1
Open "C:\Saved\Auto spammer timer.txt" For Input As #2
Input #2, Contentfile1
Text2.Text = Contentfile1
Close #2
End Sub
Private Sub Command3_Click()
Timer1.Interval = Text2.Text
Dim g As Long
g = FreeFile()
Open "C:\saved\Auto spammer timer.txt" For Output As #g
Print #g, Text2.Text
Close #g
End Sub
Private Sub Form_Load()
On Error GoTo ErrHandle
Dim strFileContent() As String
Dim cFile As Long
Dim iLineCount As Long
'// Get A Valid File Handle
cFile = FreeFile
'// Open The File For Reading
Open "C:/Saved/Auto spammer" For Input As #cFile
Do While Not EOF(cFile)
'// Resize String Array During Read
iLineCount = iLineCount + 1
ReDim Preserve strFileContent(iLineCount - 1)
Input #cFile, strFileContent(iLineCount - 1)
Loop
Close #cFile
Text1.Text = Join(strFileContent, vbCrLf)
'// Check Text For String
If Text1.Text = "Lol test" Then
Form2.Show
Unload Me
End If
Exit Sub
ErrHandle:
If Err.Number = 76 Then
'// Make The Directory If Needed
If Dir$("C:/Saved", vbDirectory) = vbNullString Then
MkDir "C:/Saved"
End If
'// Path Was Invalid, Create File
cFile = FreeFile
Open "C:/Saved/TestFile.txt" For Output As #1
Close #1
Else
MsgBox Err.Number & ": " & Err.Description
End If
If Err.Number = 53 Then
'// Make The Directory If Needed
If Dir$("C:/Saved", vbDirectory) = vbNullString Then
MkDir "C:/Saved"
End If
'// Path Was Invalid, Create File
cFile = FreeFile
Open "C:/Saved/Auto spammer.txt" For Output As #1
Print #1, "Lol test1"
Close #1
Else
MsgBox Err.Number & ": " & Err.Description
Form2.Show
cFile = FreeFile
Open "C:/Saved/Auto spammer.txt" For Output As #1
Print #1, "Lol test1"
Close #1
End If
End Sub
Private Sub Timer1_Timer()
SendKeys (Text1.Text)
SendKeys "{Enter}"
End Sub
|
Please help T_T
I don't know what the problem is _________________
|
|