 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Hack-Addict Master Cheater
Reputation: 0
Joined: 20 Nov 2007 Posts: 287
|
Posted: Sat Feb 02, 2008 4:13 pm Post subject: Visual basic (help) |
|
|
Hey guys, I need a little bit of help...
Ok, so I made a bat coder (A more friendly batch coder) and my load feature isn't working properly. It only loads the first line of code... I would give you the code that I'm using, but I'm on my laptop, and my Mom is using the comp with visual basic on it. But can you help me? Give me a code to make it load all the lines?
I have the text as multiline. So I don't know what the problem is. =[
(Please be sure that it actually pops up with the open thing, not just have it typed in there) (How to do that, is using the commondialog...)
Thanks.
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Feb 02, 2008 4:45 pm Post subject: |
|
|
I assume you mean reading the files contents is failing and only loading the first line? If so, try this code instead:
| Code: | Option Explicit
Private Sub Command1_Click()
'// Setup Path For File
Dim strFilePath As String
Dim cDlg As cCommonDialog
Set cDlg = New cCommonDialog
If cDlg.VBGetOpenFileName(strFilePath, , , , , , , , App.Path, "Open A File", , , 0) Then
If strFilePath = "" Then Exit Sub '// No File Selected
End If
'// Obtain Availible File Number
Dim fFile As Integer
fFile = FreeFile
'// Open And Read File
Dim strFileText As String
Open strFilePath For Input As fFile
strFileText = Input(LOF(fFile), fFile)
Close fFile
Text1.Text = strFileText
End Sub |
Attached is the class I used. (Credits to whom ever wrote the class cause I didn't. Don't remember where I got it either.)
_________________
- Retired. |
|
| Back to top |
|
 |
|
|
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
|
|