View Single Post
  #1  
Old 18-03-2021, 01:02
Ele's Avatar
Ele Ele is offline
Registered User
 
Join Date: Nov 2020
Location: Near Mars
Posts: 93
Thanks: 89
Thanked 96 Times in 37 Posts
Ele is on a distinguished road
Question Preprocessor Issue: Inno Setup

I've a problem. How to fix this?



Example:

Code:
Load.ini

[Form]
; Language
cache1=En_us
; Position: X
cache2=$DeskWidth$ - 95%
; Position: Y
cache3=$DeskHeight$ - 90%
; Form Width
cache4=450
; Form Height
cache5=450
; Form Border
cache6=no
 
cache7, cache8, ...
Code:
Test.iss

{Code]
#define public i
#define public FCacheMax 26
#dim public FCache[5]

#sub CheckFCache
  #define FCache[i] ReadIni(AddBackSlash(SourcePath)	+ "load.ini", "Form", StringChange("cacheInt","Int", Str(i)), "")
#endsub
#if ReadIni(AddBackSlash(SourcePath)	+ "load.ini", "Form", "cache1", "") != ""
  #redim FCache[Int(FCacheMax)]
  #for {i = 1; ReadIni(AddBackSlash(SourcePath)	+ "load.ini", "Form", StringChange("cacheInt","Int", Str(i)), "") !=""; i++} CheckFCache
#endif

function InitializeSetup(): Boolean;
begin
  MsgBox('{#FCache[1]}', mbConfirmation, MB_OK);
end;
__________________
- All life is an experiment. The more experiments you make the better. -
Reply With Quote
Sponsored Links