Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Ugggh error's (Visual basic) please help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Hack-Addict
Master Cheater
Reputation: 0

Joined: 20 Nov 2007
Posts: 287

PostPosted: Sat Dec 15, 2007 3:35 pm    Post subject: Ugggh error's (Visual basic) please help Reply with quote

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

_________________

Sciextron made the userbar up here, Rep him =D

[img]http://i145.photobucket.com/albums/r225/Michaell61/header.gif[/img] <---Visit theprocoders today!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites