Inno Setup - How to read from and write to an ini file? -


I am fairly new to nanotechnology and am now trying to read values ​​from .i file. I need to read the values ​​for the checked state (first true / false events in that line).

  AddCheckBox ('Global', '', 0, true, true, true, true, TStringList.Create); AddCheckBox ('Option1', '', 1, False, True, False, True, Testing List. Creat); AddCheckBox ('Option 2', '', 1, Truth, Truth, False, Truth, TStringList.Create);  

And store new values ​​after installation.

Can anyone show me a snippet of code or an example, how to do it?

Here's the full code: [Setup] AppName = My program is AppVerName = My program version 1.5 DefaultDirName = {pf} \ My program [files] Source: ReadMe1. Rtf; Flags: Dontakopy Source: Reed ME2. RTF; Flags: Dontakopy Source: Reed ME3. RTF; Flags: Dontakopy Source: Image1.bmp; Flags: Dontakopy Source: Image2.bmp; Flags: Dontakopy Source: Image3.bmp; Flags: Dontakopy Source: Files * DestDir: {app} \ add; Flags: Repeat for unseen; Check: check box (2) [code] var page: trigger page; List box: TNewCheckListBox; Memo: TRICHEditViewer; CzechLabel: TLabel; Mouse: integer; Bitmap image: TBITmapmize; InfoBmp: array of TBITMAP; Function Checked Box (item number: integer): Boolean; Start the result: Listboxes. Check [item number]; End; Process checkon click (sender: tubet); Get started if MouseY & lt; ListBox.Items.Count Then Start ListBox Check [Mouse Y]: = No (ListBox.Checked [MouseY]); End; End; Process checkmouse (sender: tobjet; shift: teesoftstate; x, y: integer); Start Mouse: = Y / Scale Y (16); If Maandu & LT; Listbox.item Calculate Again Memo RTFText: = Teestrings (listbox. ITM object [mouse]]. Text; Bitmap image Bitmap: = InfoBmp [Mouse Y]; End; End; Process Initial Wizard (); Var i: integer; Start ExtractTemporaryFile ('ReadMe1.rtf'); ˙ ExtractTemporaryFile ('ReadMe2.rtf'); ExtractTemporaryFile ('ReadMe3.rtf'); ExtractTemporaryFile ('Image1.bmp'); ExtractTemporaryFile ('Image2.bmp'); ExtractTemporaryFile ('Image3.bmp'); Pages: = content page (wpWelcome, 'title', 'description') ListBox: = TNewCheckListBox.Create (page); Start with ListBox Left: = 15 Head: = 0 Width: = 200 Height: = 149 Parent: = Page. Add surface Crackbox ('Global', '', 0, true, true, true, true, TStringList.Create); AddCheckBox ('Option1', '', 1, False, True, False, True, Testing List. Creat); AddCheckBox ('Option 2', '', 1, Truth, Truth, False, Truth, TStringList.Create); . TStrings (ItemObject [0]) LoadFromFile (ExpandConstant ('{tmp} \ ReadMe1.rtf')); . TStrings (ItemObject [1]) LoadFromFile (ExpandConstant ('{tmp} \ ReadMe2.rtf')); . TStrings (ItemObject [2]) LoadFromFile (ExpandConstant ('{tmp} \ ReadMe3.rtf')); End; Memo: = TRICHEditViewer.Create (page); Start with Memo Left: ListBox.Left + ListBox.Width + 8; Top: = List box. Tap; Width: = List box. Wide; Height: = List box. height; Color: = clBtnFace; Enabled: = false; Border style: = BSN; Generator: Page = Surface; End; Checklabel: = TLabel.Create (page); Start with checklabel width: = List box. Height: = List box. height; Auto Size: = Incorrect; Transparent: = true; OnMouseMove: = @ CheckMouseMove; Onclick: = @ checkonclick; Generator: = Listbox; Cursor: = 1; End; Bitmapmize: = TBTmapmize (Page); Start automatic shape with bitmap image: = true; Left: = List box. Left; Top: ListBox.Top + ListBox.Height + 8; Width: = List box. Wide; Height: = 32; Generator: Page = Surface; End; I: = 0 for listbox. item. Calculation - 1 set; Endangered (InfoBmp, i + 1); InfoBmp [i]: = TBitmap Create; End; InfoBmp [0] .LoadFromFile (ExpandConstant ('{tmp} \ Image1.bmp')); InfoBmp [1] .LoadFromFile (ExpandConstant ('{tmp} \ Image2.bmp')); InfoBmp [2] .LoadFromFile (ExpandConstant ('{tmp} \ Image3.bmp')); End;


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -