Not2BeTrusted2
Unregistered
yea i think it is possible.. but this is how i would do it =p i would put a control for webbrowser in my program and make it invisible so u only receive information from it like that
Mind explaining that... or to steal a quite from you "yea ok i cant find any tutorials so can some1 juss gimmi the codes like the subs/functions/types"
grimsk8ter11
Unregistered
use INet to download the file from the webserver, then use putvar/getvar.
thats what hes saying, and yes, it will work.
You might be able to substitute the app.path part, with the inet url, and maybe, it will work. I will try in a bit.
Okay, I'll try that when I get the chance, thanks.
Okay, that reads the stuff, but the game won't read it as an ini file.
Does anyone know how to read an ini type file from a text box in VB?
I don't see how that would work, maybe you could explain it to me. And if you want faster, just go with access or go with mysql.
grimsk8ter11
Unregistered
Code:
Public Function DownloadFile(srcFileName As String, targetFileName As String)
Dim Size As Long, Remaining As Long, FFile As Integer, Chunk() As Byte
If Trim(targetFileName) "" Then
If Extension "" Then
If Mid(Extension, 1, 1) = "\" Or Mid(Extension, 1, 1) = "/" Then Extension = Mid(Extension, 2, Len(Extension))
If Mid(Extension, Len(Extension), Len(Extension)) = "\" Or Mid(Extension, Len(Extension), Len(Extension)) = "/" Then Extension = Mid(Extension, 1, Len(Extension) - 1)
If LCase(Dir(App.Path & "\" & Extension, vbDirectory)) LCase(Extension) Then
Call MkDir(App.Path & "\" & Extension)
End If
Else
targetFileName = targetFileName
End If
frmUpdate.Inet.Execute Path & srcFileName, "GET"
Do While frmUpdate.Inet.StillExecuting
DoEvents
Loop
Size = Val(frmUpdate.Inet.GetHeader("Content-Length"))
Remaining = 0
FFile = FreeFile
If Extension "" Then
Open App.Path & "\" & Extension & "\" & targetFileName For Binary Access Write As #FFile
Else
Open App.Path & "\" & targetFileName For Binary Access Write As #FFile
End If
Do Until Remaining >= Size
If Size - Remaining > 1023 Then
Chunk = frmUpdate.Inet.GetChunk(1024, icByteArray)
Remaining = Remaining + 1024
Else
Chunk = frmUpdate.Inet.GetChunk(Size - Remaining, icByteArray)
Remaining = Size
End If
Put #FFile, , Chunk
If Size > 0 Then frmUpdate.Label4.Caption = Int(Str((Remaining / Size) * 100)) & "%"
Loop
Close #FFile
DoEvents
End If
End Function
thats from GSDs old updater, you should have no problem figuring out what needs to be chhanged around. (frmUpdate and removal of albels you dont have). It downloads the file to your directory and you can read it from there.