| Mirage Source http://web.miragesource.net/forums/ |
|
| Read and Write InI's http://web.miragesource.net/forums/viewtopic.php?f=210&t=501 |
Page 1 of 1 |
| Author: | Reece [ Mon Sep 11, 2006 6:19 pm ] |
| Post subject: | Read and Write InI's |
Hey, i have to make a database at school and ini's seemed simple to make. i have 3 months untill i have to start, so could somone post with a detailed expantation of how they work please? <3 if you do and cookies |
|
| Author: | Lea [ Mon Sep 11, 2006 7:12 pm ] |
| Post subject: | |
There's two functions, ReadINI and WriteINI... I dont know what else there is to explain O-o |
|
| Author: | pingu [ Tue Sep 12, 2006 12:18 am ] |
| Post subject: | |
Eh... Quote: [HEADER1]
Value1=3 Value2=6 Value3=Pie [HEADER2] Value1=9 Value2=Huge Value3=1 That's the format... |
|
| Author: | halla [ Tue Sep 12, 2006 3:17 am ] |
| Post subject: | |
Do you want the code? the API call and how to use them? Other than that its pretty easy |
|
| Author: | Matt [ Tue Sep 12, 2006 8:23 am ] |
| Post subject: | |
Actually, putvar and getvar are alot nicer. You can rip those from MS too, they read/write ini files. |
|
| Author: | Reece [ Tue Sep 12, 2006 9:17 am ] |
| Post subject: | |
halla that would be awsome I mean can you like post an exaplme of how they read from the ini? |
|
| Author: | halla [ Tue Sep 12, 2006 4:25 pm ] |
| Post subject: | |
Sure. This is taken from my Snake game. I made a mod and named it modINI. This just sets read and write ini. Code: Option Explicit Public Declare Function WritePrivateProfileString& Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal FileName$) Public Declare Function GetPrivateProfileString& Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal ReturnedString$, ByVal RSSize&, ByVal FileName$) Public Sub WriteINI(INISection As String, INIKey As String, INIValue As String, INIFile As String) Call WritePrivateProfileString(INISection, INIKey, INIValue, INIFile) End Sub Public Function ReadINI(INISection As String, INIKey As String, INIFile As String) As String Dim StringBuffer As String Dim StringBufferSize As Long StringBuffer = Space$(255) StringBufferSize = Len(StringBuffer) StringBufferSize = GetPrivateProfileString(INISection, INIKey, "", StringBuffer, StringBufferSize, INIFile) If StringBufferSize > 0 Then ReadINI = Left$(StringBuffer, StringBufferSize) Else ReadINI = "" End If End Function Writing to the INI file. Code: Call WriteINI("HIGH SCORES", "1.", lblFinalScore.Caption, (App.Path & "\highscores.ini")) First part calls it. HIGH SCORES is like the category its labeled under. Then 1. is a sub category... it then writesFinalScore's Caption to that category. Then the last part places it in highscores.ini . Read INI Code: HighScore = Trim(ReadINI("HIGH SCORES", "1.", App.Path & "\highscores.ini"))
HighScore = just sets that value to the following. Then it searches under the Category HIGH SCORES. Then it finds the sub category 1. It takes the value from there and thats the value of HighScore. Then of course the last part is the file it takes the info from. Anyways pretty simple. You should be able to do whatever you need with this. If you need any more help let me know. |
|
| Author: | Reece [ Tue Sep 12, 2006 4:32 pm ] |
| Post subject: | |
Thanks man realy helped me loads. If you ever need anything webhosting or PHP wise, ask |
|
| Author: | halla [ Tue Sep 12, 2006 8:02 pm ] |
| Post subject: | |
Not a problem. And thanks... I know basic PHP but im not expert. |
|
| Author: | FrankJScott [ Thu Mar 10, 2022 8:41 pm ] |
| Post subject: | New Online Mastering Music Advice |
In response to the people asking about best mastering bundle, best mixing and mastering plugins reddit, best mixing and mastering bundle, abbey road mastering review, how much does it cost for mixing and mastering, how to become a mixing and mastering engineer, how much does mixing and mastering cost in nigeria, best open back headphones for mixing and mastering 2020, how long does it take to learn mixing and mastering, how much does professional mastering cost, best way to learn mixing and mastering, what is the best daw for mixing and mastering, best mixing and mastering services, best free mixing and mastering vst, best books for mixing and mastering reddit, best mixing and mastering software, mixing and mastering services in south africa, what is the difference between mixing and mastering, I highly suggest this top rated mixing and mastering services details for best mixing and mastering bundle, Online Mixing and Mastering, best studio headphones for mixing and mastering, how long to mix and master a song, mixing and mastering services in south africa, online mixing and mastering jobs, how much does landr mastering cost, best software for mixing and mastering vocals, online mixing and mastering uk, how much to charge for mixing and mastering, how to mix and master a song in fl studio, mixing and mastering engineer salary, price to mix and master a song, mixing and mastering tips and tricks, mixing and mastering prices uk, best online mixing and mastering course, best headphones for mixing and mastering under 100, cost of mastering a song, is good as well. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|