|
-
Jul 20th, 2012, 01:06 PM
#7
Hyperactive Member
Re: How to change a string in a text file...
 Originally Posted by jmsrickland
I cannot imagine what those PrivateProfile APIs have to do with the OP's request
 Originally Posted by Mr_Bateman
I have a user enter an IP address that is being written to a file in the form of
10.x.y.50
The text file should appear as...
IPAddress=10.20.30.50
IPAddress2=10.30.45.50
which is exactly what you can do with the WritePrivateProfileString Is used for, writing and reading INI-kinda files, exactly what he's asking for..... but then using API..
Hmmm.. Sorry, now I see what he's actually asking.. 
I need to make another IP address from the user input IP address to take the form of 10.(x+10).(y+15).50
well, it was late at work and I was in a hurry to get out so I didn't read the question correctly..
But then the Split is the best simple option or just parse it with Instr(), but that's much more code..
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|