Jump to content

Iniread


cyberdv3
 Share

Recommended Posts

[b]Selamun aleyküm,[/b]

[b]Arkadaşlar $idface adında bir inputum var , program başlangıcında Ayarlar.ini'de bulunan [/b]
[b]kullanıcı K.adi'nı Okutmak İstiyorum[/b]

[b]Ayarlar.ini'yi Şöyle Hazırladım ;[/b]
[b]$exeyolu = @SCRIPTDIR & '\Ayarlar.ini'
$ayar = iniWrite ( $exeyolu, 'Bilgiler', 'K.adi', GUICtrlRead($idface))[/b]

[b]ini sorunsuz oluşuyor fakat programı tekrar açtığımda inideki veriyi alamıyorum alttaki kodda hata , hatalar nerede?? yardım bekliyorum.. şimdiden teşekkürler[/b]




[b]$idface = iniread(@Scriptdir & "\Ayarlar.ini","Bilgiler","K.adi","")[/b]
Link to comment
Share on other sites

[CODE]
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
Global $IniDir = @DesktopDir & "\Deneme_123.ini"
If Not FileExists($IniDir) Then FileOpen($IniDir, 1)
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 269, 362, 192, 124)
$Input1 = GUICtrlCreateInput("", 8, 8, 217, 21)
$Button1 = GUICtrlCreateButton("Ekle", 232, 8, 27, 21)
$List1 = GUICtrlCreateList("", 8, 40, 249, 175)
$Edit1 = GUICtrlCreateEdit("", 8, 224, 249, 129, BitOR($ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, StringFormat("İnput" & Chr(39) & "a bir şeyler yaz. Listeye eklenecektir. \r\nProgramı kapat, sonra tekrar aç, eklediğini \r\nlistede bulacaksın. AsmazH.TM"))
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
_IniRead_ListAdd()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Input_Read = GUICtrlRead($Input1)
If Not StringInStr($Input_Read, "|") And $Input_Read <> "" Then
GUICtrlSetData($Input1, "")
IniWrite($IniDir, "LİSTE", "1", IniRead($IniDir, "LİSTE", "1", "") & $Input_Read & "|")
_IniRead_ListAdd()
Else
MsgBox(0, "", "Lütfen '|' karakrerini kullanmayın." & @CRLF & "İnput'a bir şeyler gir!")
EndIf
EndSwitch
WEnd
Func _IniRead_ListAdd()

Local $Ini_Read = IniRead($IniDir, "LİSTE", "1", "")
ConsoleWrite($Ini_Read & @CRLF)
Local $IniRead_Split = StringSplit($Ini_Read, "|")

GUICtrlSetData($List1, "")

For $i = 1 To $IniRead_Split[0]
If $IniRead_Split[$i] <> "" Then GUICtrlSetData($List1, $IniRead_Split[$i])

Next
EndFunc ;==>_IniRead_ListAdd
[/CODE]

Link to comment
Share on other sites

  • 1 yıl yıl...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...