ミスってたから再投稿
ミスってたから再投稿
//後ろのあれは適当
#uselib "kernel32.dll"
#cfunc GetPrivateProfileInt "GetPrivateProfileIntA" sptr, sptr, int, sptr
#func GetPrivateProfileString "GetPrivateProfileStringA" sptr, sptr, sptr, var, int, sptr
#func WritePrivateProfileString "WritePrivateProfileStringA" sptr, sptr, sptr, sptr
//書き込み
WritePrivateProfileString "くだもの", "りんご", "10個", "C:\\test.ini"
WritePrivateProfileString "くだもの", "みかん", "15個", "C:\\test.ini"
WritePrivateProfileString "やさい", "はくさい", "200", "C:\\test.ini"
//読み込み
sdim buf, 100
GetPrivateProfileString "くだもの", "りんご", "10個", buf, 100, "C:\\test.ini"
mes buf
GetPrivateProfileString "くだもの", "みかん", "15個", buf, 100, "C:\\test.ini"
mes buf
mes GetPrivateProfileInt("やさい", "はくさい", 200, "C:\\test.ini")
//書式
//GetPrivateProfileInt "セクション", "キー", 取得できなかった場合の数値, ".iniのパス"
//GetPrivateProfileString "セクション", "キー", 取得できなかった場合の文字列, 結果を代入するバッファ, バッファのサイズ, ".iniのパス"
//WritePrivateProfileString "セクション", "キー", "設定する値", ".iniのパス"