|
Post by Webagent007 on May 20, 2003 6:18:33 GMT -5
Public Function SafeInfo(sCookie As String, sTicket As String, sProfile As String) Dim TextInFile As String Dim F As Integer
F = FreeFile On Error Resume Next Open App.Path & "\passports.ini" For Binary As #F TextInFile = Space$(LOF(1)) Get #F, , TextInFile ' Debug.Print TextInFile ' Stop Close #F If (InStr(TextInFile, sTicket) > 200) And (InStr(TextInFile, sProfile) > 200) Then TextInFile = Replace(TextInFile, sTicket, txtTicket.Text) TextInFile = Replace(TextInFile, sProfile, txtProfile.Text) Kill App.Path & "\passports.ini"
Open App.Path & "\passports.ini" For Binary As #F Put #F, , TextInFile Close #F End If Combo1.Clear LoadPassPorts Combo1.Text = "Select a Passport..." End Function
my Combo1.Text loads several passports in passport ini file, now if I want to update those passports, I want it to save it and problem is in "If (InStr(TextInFile, sTicket) > 200) And (InStr(TextInFile, sProfile) > 200) Then" I think, if I make it >1 it replaces just about everywhere, I could make variable that will store the correct number and then compare it but isnt there a better way in total? Can I use text stream to replace data?
|
|
|
Post by Webagent007 on May 29, 2003 15:16:30 GMT -5
ok well just to explain, theres nothing wrong with this code, the mistake was in my ini file.. there used to be a mistake in the code wich replaced all of the info, so it was all same, and its told to replace matches so it kept replacing everything if that makes sence lol
|
|
hacker
New Member
Banned
Posts: 7
|
Post by hacker on Jun 1, 2003 10:17:31 GMT -5
uhuh web 100% .... .....
|
|