Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
||
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[3.138.200.66] |
|
Сообщ.
#1
,
|
|
|
Подскажите как мне записать например 1.txt в строчку например name:test ...
Т.е. фаил имеет такой вид: 2 w ee r name: 23 323 3 23 как мне конкретно в name: записать то что я хочу,,,,,???? |
Сообщ.
#2
,
|
|
|
А что ты хочешь?
Я не понял, тебе что надо... Записать в массив name значения 23,323,3,23 , а в test - 2,w,ee,r? Или записать в переменную name текст "2weername:23323323"? Или ещё что-то? |
Сообщ.
#3
,
|
|
|
Например есть фаил...System.ini
в нем строчка run= В эту строчку я хотел бы записать Path to proga... т.е. для её(автозапуска при старте)... Например если юзер кликает на cmd1.click() например..... |
Сообщ.
#4
,
|
|
|
Dlja etogo est' funkcii dlja raboti s ini file-ami:
GetPrivateProfileString i WritePrivateProfileString, esli khochesh mogu vislat' na mail. |
Сообщ.
#5
,
|
|
|
Nate, kto es4o ne znaet ili kto es4o ne polu4il na mail ot Armena
Declare Function GetPrivateProfileString Lib "kernel32.dll" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long Declare Function WritePrivateProfileString Lib "kernel32.dll" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lpFileName As String) As Long Function GetINI(ByVal strItem As String, ByVal strKey As String, ByVal strFile As String) As String Dim uname As String Dim slength As Long uname = Space(255) If ((InStr(1, strItem, "[") <> 0) Or (InStr(1, strItem, "]") <> 0)) Then strItem = Replace(strItem, "[", "&") strItem = Replace(strItem, "]", "&") End If slength = GetPrivateProfileString(strItem, strKey, "", uname, 255, strFile) uname = Left(uname, slength) GetINI = uname End Function Function WriteINI(ByVal strItem As String, ByVal strKey As String, strVal As String, ByVal strFile As String) Dim retval As Long If ((InStr(1, strItem, "[") <> 0) Or (InStr(1, strItem, "]") <> 0)) Then strItem = Replace(strItem, "[", "&") strItem = Replace(strItem, "]", "&") End If retval = WritePrivateProfileString(strItem, strKey, strVal, strFile) End Function |