Archive: Writing to a specific part of an ini file


Writing to a specific part of an ini file
Anyone knows how to write a specific part of an ini file, like
first finding a string named "New=" and then starting to write from there, possibly using fileWrite?



THANKS!


WriteINIStr "C:\\path\inifile.ini" "SectionInSquareBrackets" "New" "NewValue"


Thank you very much for replying, but this doesnt do what I need. Because I am trying to write a very long string, and this function only writes a very small part of it.

So one friend here told me to use fileWrite continuously like:

fileWrite ...
fileWrite ...
fileWrite ...
...

So the string can be written by splitting it. Now the problem is, I want to write it to a specific part of a file like:

after the text "New="


Thanks again!


Is this impossible?


There is a special build of NSIS that you can use for handling large strings.

Otherwise, check the Wiki for string functions and/or plugins to help you. (Might also want to check out the text and word functions in Appendix E of the NSIS help manuals for more ideas.)


Comperio,

With your information, I get to write much longer strings! Thank you very much. But this still didnt let me to write a very long 1 line string.

In case you want to see the code, I have attached it.

Can you see a way to solve this?


THANKS SO MUCH AGAIN!


You still need to use multiple FileWrite instructions ideally if your data is not static. If it is static then you can easily split it up into seperate FileWrite instructions.

As for writing after a specific piece of text in a file, you have to read from the original file line by line writing to a new text file. When you find the line you are after, you write your new text to the new text file, and then continue writing the rest of the old text to the new file. Once that is done, you can replace the old file with the new file.

Sounds pretty hard but in reality and logically it is very easy. Most of the functions on the Wiki work this way.

-Stu


You mean either way I will have to use FileWrite? If so, can you please show me a small example like this:

[UK]
England=16

[XSI]
New=
Mass=4

[Ca]
Canada=8

Just like you say, only writing the string after New=.

I would greatly appreciate if you write a small snippet.

THANKS SO MUCH!


Please someone help.


Anyone care to help please?



!define INIFile "$EXEDIR\inifile.ini"

GetTempFileName $R1
FileOpen $R0 $R1 w
FileOpen $R2 "${INIFile}" r
StrCpy $R4 0

Loop:
ClearErrors
FileRead $R2 $R3
IfErrors Done

FileWrite $R0 $R3
StrCmp $R4 1 Loop
StrCmp $R3 "New=$\r$\n" 0 Loop

FileWrite $R0 "some text,"
FileWrite $R0 "some more text"
FileWrite $R0 "$\r$\n"
StrCpy $R4 1

Goto Loop
Done:
FileClose $R2
FileClose $R0

SetDetailsPrint none
Delete "${INIFile}"
Rename $R1 "${INIFile}"
SetDetailsPrint both


-Stu

Hey Afrow,

Thank you so much! I cant thank you enough man. It will really help me so much but it didnt work and I dont know why.

You create a temp file copy everything from the first file and then write my text and then delete the original and rename the new one, right?

If so, I didn't see the file deleted, as in the file is in the same file place again, like 4th icon for example. Also the text in the key hasnt been changed.

I have created a key manually by myself called New=34, but nothing has changed.

Any idea?

THANKS SO MUCH AGAIN!


You gave me an example with New= not New=34 which is why it does not work. It checks for a line that equals New=$\r$\n ($\r$\n being the new line on the end) but what is needed is to check the first 4 characters of the line for New=.

This new code should work if I think what you need is correct.


!define INIFile "$EXEDIR\temp.ini"

GetTempFileName $R1
FileOpen $R0 $R1 w
FileOpen $R2 "${INIFile}" r
StrCpy $R4 0

Loop:
ClearErrors
FileRead $R2 $R3
IfErrors Done

StrCmp $R4 1 Write
StrCpy $R5 $R3 4
StrCmp $R5 "New=" 0 Write

FileWrite $R0 $R5
Goto +3
Write:
FileWrite $R0 $R3
Goto Loop

FileWrite $R0 "some text,"
FileWrite $R0 "some more text"
FileWrite $R0 "$\r$\n"
StrCpy $R4 1

Goto Loop
Done:
FileClose $R2
FileClose $R0

SetDetailsPrint none
Delete "${INIFile}"
Rename $R1 "${INIFile}"
SetDetailsPrint both


-Stu

Afrow,

Thanks so much again. This seems to do what I need.

So first I will create a key called "New", as empty and then use your code to fill it. Now there is only 1 problem.

When I use your code, it doesnt write just near the key, but after a line return, like this:

New=
some text...

Any ideas?


THANKS AGAIN!


Are you sure? I cannot reproduce that. I can only guess that it will happen if you do FileWrite $R0 "$\r$\n" first.

I will convert this into a function for the Wiki for writing large amounts of data to INI files.

-Stu


I use this:

!define INIFile "$INSTDIR\options.ini"

GetTempFileName $R1
FileOpen $R0 $R1 w
FileOpen $R2 "${INIFile}" r
StrCpy $R4 0

Loop:
ClearErrors
FileRead $R2 $R3
IfErrors Done

StrCmp $R4 1 Write
StrCpy $R5 $R3 4
StrCmp $R5 "New=" 0 Write

FileWrite $R0 $R5
Goto +3
Write:
FileWrite $R0 $R3
Goto Loop

FileWrite $R0 "(#(3342347,3473420,3407883,3605261,3538956,3736335,3670030,3801103,3998481,3932945,3932945,4130067,4129555,4326677,4458007,4392470,4392214,4589336,4589080,4720410,4720410,4851483,4785947,4982557,4917021,5114143,5114142,5179679,5245215,5311009,517967 9,5310751,5310751,5245215,5310751,5245215,5245215,5310751,5310751,5245215,5310751,5310751,5376287,5376287,5310751,5244702,5310238,5244702,5179164,5244701,5178908,5178907,5178907,5244444,5178907,5178651,5244443,5178650,5178650,5178650,5047577,5047577, 4982041,4916504,4850968,4719895,4719895,4654358,4522773,4522773,4457749,4391701,4326164,4260628,4260628,4129556,4129556,4129556,4129556,4064020,4064020,3998484,3998484,3998484,3998484,3998484,3998996,3933460,3933460,3998996,3933461,3933461,3933461,38 67925,3867925,3802389,3802389,3802389,3736853,3802389,3736853,3736852,3736852,3671315,3671315,3671315,3605778,3671314,3736850,3736850,3802387,3802643,3868179,3868180,3933716,3999252,3999508,4065045,4065044,4065045,4065045,4065045,4130581,4130581,4130 581,4130582,4130582,4327190,4327703,4327703,4458776,4458776,4327704,4393496,4262167,4327960,4262424,4262424,4328217,4131352,4131352,4131352,4131609,4065816,4066073,3934744,4066073,3869207,3934744,3803671,3869464,3803928,3803927,3607063,3803928,354152 6,3738392,3738136,3869464,3738136,3935001,3803671,4000281,4065817,4000024,3868439,3999511,3802645,3933718,3802644,3868180),#(3474188,3407883,3407883,3605261,3538956,3736335,3801871,3735566,3998482,3932945,3932943,4130067,4129555,4130068,4458007,43924 70,4589080,4589336,4589336,4720410,4851484,4851484,4982557,4983069,4982557,5114142,5114143,5245215,5114143,5311009,5179679,5245215,5311007,5310751,5245215,5376545,5245215,5310751,5376289,5310751,5376287,5376287,5376287,5376287,5441823,5310238,5375774 ,5375774,5310238,5310237,5375773,5309981,5309980,5375517,5309980,5309980,5375517,5309980,5309979,5309980,5178906,5178906,5047834,4982041,4916504,4850968,4785431,4719894,4653846,4588309,4457237,4457237,4391700,4326164,4260628,4260628,4129556,4129556,4 129556,4064020,4064019,4064020,3998484,3998483,3998484,3998484,3998996,3933460,3933460,3933460,3933460,3933460,3867924,3867925,3867924,3802389,3802389,3802388,3736853,3736852,3736852,3671316,3671315,3671315,3605779,3605778,3605777,3605777,3605265,360 5263,3671313,3736849,3802386,3802643,3868179,3933715,3933716,3999508,3999508,4065045,4130581,4130581,4130581,4130580,4130581,4130581,4261654,4327702,4327703,4327191,4458776,4458776,4393239,4393496,4393496,4393496,4393496,4262424,4327961,4262424,42626 81,4131608,4131608,4066072,4131608,4000536,4066073,3869207,3935000,4000537,3803928,3803927,3803927,3672855,3738392,3541527,3738392,3869465,3869465,3803672,3935001,3803672,4000538,4131610,4000281,4000024,4131097,3933975,4065047,3933717,3999253),#(3539 724,3408651,3407883,3605261,3670798,3604493,3801871,3736335,3998481,3932945,3932943,4064018,4261397,4261140,4392471,4458007,4589337,4589081,4720410,4654874,4851484,4917020,4982557,4982557,5114143,5114143,5245215,5245215,5311009,5311009,5245215,524521 5,5310753,5311009,5310751,5376289,5311009,5376545,5376289,5442081,5376287,5573154,5507617,5441823,5507359,5507359,5441311,5441311,5506847,5441310,5441311,5441310,5441054,5506846,5441310,5441309,5506846,5441309,5375516,5375516,5309979,5244442,5178906, 5113113,5047577,4982040,4916503,4850967,4785431,4654358,4588309,4522773,4457236,4391700,4391700,4326163,4260628,4129555,4129555,4129556,4064019,4064019,4064020,3998483,3998483,3998484,3998483,3933460,3932948,3933460,3933460,3867924,3867924,3867924,38 02388,3802388,3802389,3736852,3736853,3736852,3736852,3671316,3671315,3671315,3605778,3540241,3540241,3540239,3474191,3474191,3539727,3539727,3670799,3736849,3736849,3802386,3868179,3868178,3999251,3999508,4065044,4065044,4130581,4130580,4130580,4130 581,4261653,4327190,4327190,4393239,4458776,4458776,4458776,4459032,4458776,4393496,4393496,4262424,4393497,4262424,4262681,4131608,4131609,4262682,4131609,4066072,4066072,4131609,4000536,4000537,3869464,3935001,3738392,3672856,3738392,3869465,380392 9,3869465,3803929,4000794,4000538,3869464,4066074,4131610,4066074,4262683,4131353,4065561,4130585,3999510,4130327),#(3539725,3408651,3342346,3473420,3605261,3605261,3867407,3736335,3998481,3932943,4064531,4064018,4261141,4261141,4458007,4458007,45893 37,4523544,4785947,4720410,4917020,4917020,5048606,4982558,5114143,5048606,5179679,5245471,5311009,5311009,5376546,5245215,5442082,5376546,5376545,5376545,5376545,5376545,5441825,5573154,5441823,5638690,5573154,5572897,5572897,5638434,5572383,5572383 ,5637921,5572383,5572383,5637919,5572383,5572383,5572383,5506846,5506846,5506846,5506844,5441308,5441052,5375515,5309979,5244442,5178905,5113369,5047577,4982040,4916504,4785431,4785430,4719382,4588309,4588309,4522773,4391700,4391700,4326163,4260627,4 129555,4129555,4129555,4129555,4130067,4064019,4064019,3998995,3998483,3998995,3933460,3933459,3867924,3867924,3867924,3802388,3802388,3736852,3736852,3736852,3671316,3671316,3671316,3605778,3605778,3605778,3540241,3474705,3474191,3408655,3408655,347 4191,3474190,3474191,3605263,3539727,3671311,3736847,3736847,3867922,3868178,3933714,3999507,3999507,4130580,4130580,4130581,4261653,4261654,4327190,4393239,4458775,4458775,4458775,4393240,4458776,4393496,4393496,4459033,4393496,4262424,4328217,43282 17,4131609,4262682,4131609,4131609,4066073,4131866,4000537,4066073,3869464,3935257,3738392,3869465,3738392,3869721,3804185,3935001,3869465,4000794,3869465,4066330,4066330,4131867,4131611,4328475,4131610,4393755,4327962,4130584,4261657),#(3539725,3276 809,3474188,3473419,3670798,3605261,3867407,3801871,3867407,3867407,4130067,4064018,4261141,4261397,4458007,4589337,4589337,4589080,4785947,4785946,4917020,4917020,4982557,5048606,5114143,5114142,5179679,5179679,5245473,5311009,5442339,5311009,537654 6,5376546,5442338,5442081,5573411,5507618,5573154,5638947,5638690,5704227,5704227,5704227,5703970,5769507,5703970,5703970,5769506,5703457,5703457,5637919,5637919,5637919,5637919,5637919,5637918,5637918,5637917,5572381,5572381,5506588,5441052,5375515, 5309978,5244442,5178650,5113369,5113369,5047576,4982040,4916503,4850967,4785430,4719894,4588821,4588309,4457236,4392212,4326164,4260627,4261139,4129555,4130067,4129555,4129555,4064531,4064532,3998995,3998995,3998996,3933459,3867924,3867924,3802388,38 02388,3736852,3737108,3671316,3671316,3671572,3605779,3540242,3605778,3540241,3474703,3474703,3408655,3343119,3343119,3343117,3343117,3408654,3408654,3474190,3539726,3539726,3539726,3670799,3736335,3802383,3867921,3867921,3999250,4064787,4130580,4130 581,4261653,4327190,4392726,4393239,4392727,4458775,4393239,4458775,4458776,4393240,4458776,4393497,4393497,4327961,4327961,4131353,4328217,4131609,4262938,4066073,4131609,3935000,4066329,3935257,4000793,3803928,3869721,3738392,3869721,3869721,393525 8,3869722,4000794,3935001,4131867,4000537,4262939,4131867,4328475,4262683,4459548,4262682,4459035,4459035),#(3343115,3276810,3474188,3474187,3670798,3605261,3867407,3932945,3867407,4129555,4130067,4130067,4261141,4458007,4392471,4589337,4654873,47859 47,4785947,4785947,4917020,4982557,5048606,5048606,5114143,5179935,5179679,5179679,5311009,5376802,5376546,5376546,5442082,5442082,5573411,5442081,5638947,5638691,5704484,5704227,5901093,5835300,5835300,5900837,5835300,5835300,5835300,5769506,5835042 ,5769506,5768993,5768993,5768993,5768991,5768991,5768991,5768991,5768991,5768991,5703454,5703454,5637661,5637917,5572380,5506844,5506588,5441051,5375515,5309978,5244442,5178905,5113369,5047832,4982296,4850967,4785430,4719894,4588821,4588821,4523284,4 391699,4326675,4260627,4129555,4130067,4129555,4130067,4130068,3998483,3998995,3998995,3933459,3933460,3867924,3802388,3802644,3736852,3671572,3671572,3605779,3606036,3605779,3540242,3540498,3474706,3409169,3409167,3343119,3343119,3277582,3212045,321 2045,3343117,3277580,3343117,3408653,3408653,3474189,3539726,3539725,3605262,3736335,3736334,3867919,3867921,3999250,4130323,4130580,4261653,4327190,4392726,4458262,4327190,4393239,4393239,4393239,4393240,4458776,4393497,4393497,4327960,4327961,43937 53,4328217,4131608,4262682,4131609,4131866,4131866,4066329,3935257,4000793,3869721,3935258,4000795,3869722,4066587,3935258,3935258,4066330,3935258,4131867,4262939,"
FileWrite $R0 "131867,4262939,4394012,4262939,4459549,4328219,4590621,4393755),#(3408651,3342346,3474188,3474187,3736335,3801871,3736335,3998482,3932945,4130067,4129556,4130067,4130068,4523544,4458007,4654873,4654873,4785947,4785947,4917020,4851484,4983069,4983070 ,5048607,5048607,5245473,5179679,5245473,5311009,5442339,5442082,5573412,5507618,5638947,5704484,5704484,5704484,5770021,5835557,5835301,6032423,5966630,5966629,6032166,5901092,5900836,5966372,5900835,5900835,5900579,5835042,5900578,5900066,5900065,5 900065,5900065,5900063,5900063,5965599,5900063,5900063,5900063,5900063,5834526,5768990,5703453,5637916,5572380,5506844,5375515,5375770,5244442,5178905,5113369,5047576,4982296,4916503,4785429,4719894,4654357,4522772,4457748,4391699,4326163,4326676,412 9555,4130068,4130068,4064019,4064532,3998996,3933459,3933460,3867923,3802387,3802644,3671315,3671572,3671572,3540243,3540499,3540499,3474706,3474962,3409169,3343631,3343631,3343119,3277583,3277582,3212045,3146508,3212044,3212044,3277580,3343117,33431 16,3408653,3408652,3474188,3539725,3539725,3605261,3670798,3801871,3867919,3998993,4064786,4130323,4261653,4327189,4327189,4261654,4327191,4392726,4327702,4393239,4393239,4393239,4393240,4459032,4393497,4393497,4328217,4328218,4262681,4262682,4131609 ,4262938,4131865,4131866,4000794,4132123,3935258,4066331,3935258,4132123,3935258,4131867,4131867,4000794,4131867,4328732,4262940,4394268,4328476,4328476,4525341,4394012,4656414,4459548),#(3408652,3605262,3539725,3474188,3605261,3801871,3801871,399848 2,3932945,4130068,4064018,4326934,4261141,4523544,4523544,4654873,4654618,4785947,4654874,4851484,4851484,4983069,4983070,5114143,5114143,5179679,5179935,5311009,5311010,5507875,5442082,5639204,5638948,5704484,5770021,5901350,5835557,5966887,6032423, 6032423,6097959,6097959,6032166,6032166,6032165,6032165,6031909,6031908,6031651,6031651,6031651,6031651,6097187,6031138,6096674,6097186,6162210,6162210,6162722,6162209,6096673,6031135,6096671,5965599,5900063,5900062,5768989,5768989,5703453,5572379,55 72380,5441307,5375515,5309978,5178905,5178905,5047577,5047833,4916504,4785431,4785431,4653846,4588822,4523285,4391701,4326677,4326677,4129556,4130068,4130068,4064532,3998996,3933460,3867924,3867924,3736851,3671315,3671571,3606035,3474706,3474963,3409 170,3343633,3409426,3343631,3278095,3278095,3212046,3212046,3212046,3146509,3080972,3080972,3146508,3146508,3212044,3212044,3277580,3277579,3343115,3408652,3408651,3474188,3539725,3670798,3670798,3801871,3933455,3998993,4130322,4130323,4261652,413058 1,4130581,4130581,4262166,4327703,4327702,4327703,4393240,4393495,4327960,4393496,4328217,4328217,4262681,4328218,4131609,4262938,4066329,4131867,4066330,4066331,3935258,4132123,4066587,4132123,4000794,4132124,4066331,4132124,4131867,4328732,4328732, 4394268,4328476,4525341,4525341,4459548,4656414,4525084),#(3408652,3408651,3474188,3670798,3605261,3867407,3801871,3998994,3998482,4064019,4064019,4326934,4326677,4523544,4458008,4589337,4720410,4785947,4851484,4851484,4983070,4983069,4983070,5114143 ,5245471,5245471,5376802,5376546,5376545,5573412,5573155,5704485,5770022,5835558,5835558,6032424,5966887,6097960,6163752,6163752,6163496,6163496,6163495,6163495,6163238,6163237,6162981,6162981,6162724,6162980,6228260,6228260,6228260,6294052,6293796,6 293796,6359332,6359332,6293794,6293794,6293794,6227745,6228257,6162207,6096671,6096671,5965599,5900063,5834527,5834527,5703454,5637918,5572382,5506589,5441309,5375516,5309980,5244444,5178907,5047834,4982298,4916505,4785433,4719896,4654360,4523287,452 3287,4392214,4326678,4261142,4130069,4130069,3998997,3933460,3933460,3802388,3736851,3671571,3605779,3540499,3474962,3343634,3343889,3278353,3212559,3212559,3212559,3080973,3146510,3080973,3015436,3015436,3015435,3015435,3080971,3080971,3146507,32120 43,3277579,3277579,3343115,3343115,3408651,3474188,3539724,3605262,3736334,3801871,3867407,3998993,3998993,4064785,4064786,4130579,4065044,4130581,4130582,4262166,4262167,4327703,4327703,4327960,4393496,4328217,4327961,4262681,4328217,4328218,4262682 ,4131609,4131866,4066330,4132123,4001050,4132123,4263196,4132123,4132123,4263196,4132123,4263196,4132123,4460061,4328732,4459804,4394269,4590877,4459805,4656414,4721950,4590877),#(3474189,3539725,3474188,3670798,3670798,3867409,3801871,3932945,413032 4,4130068,4326934,4326678,4326678,4523544,4654873,4589337,4720410,4720411,4851484,4851484,5048606,4983070,5048607,5114143,5245473,5245471,5442338,5442338,5573412,5638948,5835814,5835814,6032424,6032424,6098216,6163753,6229289,6163753,6229289,6294825, 6294824,6294568,6294568,6294567,6294311,6294310,6294310,6359846,6359590,6359590,6425126,6490662,6490662,6490661,6490662,6490661,6490661,6556197,6424867,6490404,6424867,6359331,6359331,6359331,6293795,6227746,6228259,6162210,6096674,6096674,5965601,59 00065,5900065,5768991,5703455,5637919,5572383,5441310,5375774,5310237,5244701,5113372,4982299,4982299,4851226,4719897,4654617,4588824,4457751,4392215,4261142,4130069,4130069,3998997,3998997,3933460,3802388,3737108,3671571,3606035,3540499,3409426,3343 889,3278353,3212815,3147023,3081486,3081486,3015949,3015436,2949900,2949899,2884362,2884362,2949898,2949898,3015434,3080971,3080970,3146507,3212043,3276811,3277579,3408652,3474188,3539725,3605261,3670798,3736335,3867407,3867407,3867407,3933457,393345 7,3933714,3933971,4065044,4065045,4130582,4131094,4262167,4262167,4327960,4262424,4327960,4393753,4328217,4328217,4262938,4262938,4131866,4262939,4131867,4263196,4132123,4328733,4263196,4132124,4328732,4132123,4328733,4460062,4328732,4525598,4525597, 4460061,4590877,4525341,4722207,4590877,4918815),#(3671311,3605262,3539725,3736847,3670799,3867921,3998995,3998994,4130325,4130068,4392470,4326678,4458008,4392471,4589337,4589337,4720411,4720411,4917533,4851484,4983070,4983070,5114399,5179679,5311265 ,5311009,5507875,5573411,5704485,5770021,5966888,5966888,6163753,6163754,6229289,6229289,6294826,6294825,6426154,6425898,6360361,6425897,6425641,6425640,6425640,6490920,6490920,6556456,6556456,6621992,6621991,6621991,6621991,6621734,6687527,6621734,6 687270,6687270,6687271,6621478,6621734,6621734,6621478,6555942,6555942,6490406,6490405,6424869,6359333,6293796,6228260,6097187,6097187,6031651,5900065,5834529,5768991,5637919,5572383,5441310,5375774,5310237,5179164,5113628,4982555,4851226,4785690,472 0153,4589080,4523287,4392214,4326678,4130070,4130069,4064533,3933716,3867924,3802644,3737107,3606035,3540499,3474962,3409426,3343890,3212815,3147279,3081487,3015950,3015949,2949901,2884364,2884363,2818826,2753290,2818825,2818825,2884361,2949897,29491 29,3015433,3146506,3080202,3212042,3277579,3408652,3408652,3539725,3605261,3736335,3736334,3801870,3801871,3802383,3736847,3802383,3802641,3933714,3933971,4065044,4065045,4131094,4131095,4131095,4262424,4262424,4262424,4262425,4328217,4262682,4328218 ,4131866,4262939,4131867,4328475,4263195,4394269,4328732,4394269,4328989,4525598,4394525,4525598,4394525,4591134,4460061,4525598,4656670,4591134,4787743,4656414,4853279),#(3736847,3605775,3605262,3736847,3670799,3802383,4130324,4064531,4261397,413006 9,4392471,4130069,4458008,4458007,4589337,4589338,4720411,4720411,4851485,5048606,4983070,5048606,5179935,5179679,5442338,5573412,5573412,5835814,5835815,5901351,6098217,6163753,6229290,6229290,6295082,6360618,6426155,6425898,6491691,6557227,6491434, 6556970,6622506,6622250,6687786,6687786,6753322,6753321,6753321,6753321,6753064,6818601,6818601,6753064,6818344,6884137,6883881,6883881,6884137,6883881,6818345,6818345,6818345,6752808,6753064,6687272,6621735,6621735,6556198,6490662,6425125,6294052,62 28516,6162723,6031651,5966114,5835041,5769505,5703455,5572383,5506846,5441310,5310237,5179164,5113628,4982555,4916762,4785689,4720153,4589080,4457751,4392214,4326678,4130069,4130069,4064533,3933716,3868180,3802643,3671571,3606035,3474962,3409426,3343 889,3212815,3147279,3081743,2950414,2950414,2884877,2884364,2818827,2753290,2753289,2687753,2686983,2753289,2752519,2883593,2884361,2949127,3014665,3080969,3146506,3277579,3343116,3474188,3539725,3605261,3670798,3736334,3736334,3670798,3670798,367079 9,3605775,3736847,3802641,3933714,3933971,4065044,4065045,4131094,4131095,4262167,4131351,4262424,4262680,4262681,4262681,4262938,4262939,4131866,4394011,4328732,4"
FileWrite $R0 "459804,4328732,4525598,4394525,4525597,4460061,4591134,4525598,4656671,4525597,4722207,4722207,4656671,4787743,4722206,4918815),#(3736849,3671311,3605263,3671311,3933714,3867921,4130324,4064531,4261397,4392470,4326934,4458263,4458007,4458007,4589337 ,4589338,4720411,4851996,4851485,5048863,5048606,5245471,5311009,5442338,5507618,5704741,5704485,5966887,6032680,6163753,6163753,6295082,6360619,6426156,6426155,6557227,6557227,6688300,6622764,6688300,6688044,6753580,6819372,6884652,6884652,6884651,6 884651,6884394,6884394,6949930,6884138,6949674,7015467,7015211,7015211,7015212,7080748,7080748,7080748,7081004,7015467,7015467,7015467,6949674,6884138,6884137,6818601,6753064,6687527,6621991,6490662,6425125,6359589,6228516,6162723,6097187,5966114,583 5041,5769505,5703455,5572383,5506847,5375774,5310237,5179164,5113627,4982555,4916762,4785689,4720153,4589080,4457751,4392215,4261142,4130069,4130325,3999252,3933716,3868180,3737107,3671571,3606034,3474962,3409425,3278351,3212815,3081743,3015950,29504 14,2819341,2818828,2753291,2687754,2687754,2622217,2556679,2687753,2686983,2752519,2752519,2752519,2883591,2949127,3080969,3146506,3212043,3343115,3408652,3474189,3605262,3670798,3670797,3605262,3605262,3539726,3539726,3539726,3605775,3605775,3737103 ,3737362,3933971,3933972,4065046,4065558,4131351,4131352,4131351,4131352,4262681,4262681,4328218,4394011,4394012,4459548,4459804,4394268,4591133,4460061,4591134,4460062,4656670,4591134,4722207,4591135,4853535,4656671,4853279,4853279,4787999,4984607), #(3802641,3736847,3802385,3736847,3999251,3933457,4130324,4064531,4130324,4327190,4326934,4458264,4392472,4654874,4589337,4654875,4720411,4917533,4917021,5179935,5114143,5311009,5376545,5573412,5638692,5901350,5901351,6032680,6098217,6229546,6295082, 6360619,6426155,6557484,6622764,6688300,6688301,6819630,6819373,6885165,6950702,7015982,7015981,7015981,7081517,7015724,7081261,7081005,7081004,7081005,7146541,7146542,7146542,7212078,7212079,7212078,7277870,7277870,7212077,7212333,7146541,7146540,70 81004,7015467,7015467,6949674,6884137,6884137,6753064,6687527,6621991,6556198,6425125,6359589,6228516,6162979,6097187,5966114,5900577,5769503,5703455,5572383,5506846,5375773,5310237,5179164,5113627,4982555,4851226,4785689,4654616,4523543,4457751,4326 678,4261142,4130325,4064533,3999252,3933716,3802643,3737107,3671570,3540498,3474962,3343889,3278351,3147279,3015950,2950414,2819341,2753804,2687755,2622218,2556682,2556681,2491143,2556679,2622215,2621447,2686983,2686983,2818055,2818055,2949897,301543 3,3080970,3212042,3277579,3408652,3474188,3539725,3605261,3539726,3539725,3474189,3474190,3474190,3540238,4396575,6832713,7556951,5910584,3737361,3933971,3933972,4065558,4065559,4131351,4131608,4131608,4262681,4328218,4459546,4459548,4525084,4525340, 4525341,4591133,4525341,4656670,4787999,4722207,4853535,4787999,4722463,4919071,4722207,4919071,4853535,4853535,5050143),#(3868178,3933971,3933714,3802385,3999251,3933458,4130324,4261654,4130325,4327190,4327191,4458264,4458007,4589337,4589337,4720411 ,4785947,4983070,4982557,5245471,5376546,5442082,5507619,5770021,5770021,5966887,6032680,6163753,6295082,6295082,6491947,6491692,6557228,6688557,6754093,6819630,6885166,7016239,7081775,7147311,7147311,7212847,7212591,7212591,7278127,7278127,7277871,7 277871,7343408,7277872,7343408,7343408,7343408,7343408,7409200,7343407,7343407,7343407,7343407,7277870,7277869,7212333,7212077,7146540,7081003,7015467,6949930,6949929,6884137,6753064,6753063,6621991,6556198,6490661,6359588,6294052,6162979,6097186,596 6114,5900577,5769503,5703455,5572383,5506846,5375773,5310237,5179164,5048091,4982554,4851226,4785689,4654616,4523543,4458007,4326934,4261398,4130325,4064789,3999252,3868180,3802643,3671571,3606034,3540498,3409425,3278351,3212815,3081487,3016206,28848 77,2753805,2687756,2556683,2491146,2491145,2425607,2425607,2490375,2490375,2622215,2621447,2686983,2752519,2818823,2949897,2949897,3080970,3146506,3277579,3343116,3474189,3539725,3539725,3408653,3474189,3408653,3343117,4791846,16579836,16777215,16777 215,16777215,12957626,3606031,3737362,3933972,3933973,4065558,4065816,4131352,4131609,4262681,4393754,4459547,4525083,4590877,4656413,4590877,4787486,4722206,4853279,4787743,4919073,4853535,4853535,4919071,4853535,5050145,4919071,5050145,5115681),#(3 736849,3999508,3999251,3867922,4064788,4130580,3999251,4130581,4130581,4327191,4327191,4523801,4392471,4589337,4589338,4785947,4785947,5114142,5245471,5310751,5573411,5573412,5770277,5901351,6032680,6032680,6163753,6295081,6360619,6426155,6623020,662 2764,6819630,6885166,7016240,7081776,7212849,7212848,7278385,7343921,7278384,7409457,7474994,7474737,7474737,7474738,7474738,7474738,7540274,7474738,7474738,7540274,7474737,7474737,7474737,7474736,7409200,7409199,7343407,7343407,7343406,7277869,72778 69,7212332,7146540,7081003,7015467,7015466,6949929,6884137,6818600,6753064,6621991,6556454,6490661,6359588,6294052,6162979,6097186,6031650,5900577,5769503,5703455,5572383,5506846,5375773,5244700,5179164,5048091,4917018,4851226,4720153,4654616,4523544 ,4392471,4326934,4130326,4130325,4064789,3933716,3868180,3737107,3671570,3540498,3409425,3343887,3212559,3147023,3015950,2884877,2819341,2753804,2622219,2491147,2425610,2360073,2360071,2359303,2425607,2490375,2490374,2555911,2686983,2687751,2818825,2 884361,2949897,3015434,3146506,3212043,3343116,3474189,3408652,3408653,3408653,3343117,3343117,4397089,9928580,5648438,5121581,14340563,16777215,4133917,3606031,3606033,3737362,3802900,4000022,3934743,4131352,4131353,4328217,4459290,4525083,4590877,4 656156,4656413,4787486,4787742,4918815,4853279,4984607,4919071,5050145,4984609,4984609,5115681,4984609,5181218,5050145),#(3868178,4065044,3999251,3868178,3933715,4130581,4064787,4130581,4130582,4327191,4458264,4458264,4654874,4654873,4851996,4917532, 5114142,5114142,5376545,5442082,5704484,5770277,5901351,5966887,6098216,6163752,6295082,6360618,6491691,6557228,6754093,6819630,6950703,7081776,7212849,7278385,7343922,7409458,7474994,7540531,7540531,7606067,7671604,7671605,7671604,7671605,7671605,76 71604,7671604,7671604,7606067,7606067,7540530,7540530,7540274,7474737,7474737,7474736,7409200,7409199,7408943,7343406,7343406,7277869,7212333,7212332,7146539,7081003,7015466,6949929,6949929,6818600,6753063,6687527,6556198,6490661,6359589,6294052,6228 515,6097186,5966114,5900577,5769503,5703967,5572383,5441310,5375773,5244700,5179164,5048091,4917018,4851226,4720153,4589080,4523543,4392471,4326934,4130325,4130325,3999252,3933716,3868180,3671571,3606034,3540497,3409423,3278095,3147023,3081486,295041 3,2819341,2753804,2622219,2556683,2425610,2294537,2294535,2228999,2294535,2359303,2359302,2424839,2555911,2622215,2687751,2818825,2884361,2949898,3015434,3212043,3212043,3408653,3343116,3343117,3343116,3277580,3277581,3212045,3212045,6767947,9468028, 15789549,11904167,3343630,3474703,3409423,3606031,3606289,3802899,3803413,4065559,4131352,4262681,4393754,4525083,4656156,4721692,4787486,4853022,4984351,4918815,4919071,5050143,4984607,5181218,5050145,5181218,5181218,5115682,5246755,5378340),#(39339 71,4130581,3999508,4130580,3999251,4130581,4065044,4130582,4261654,4327191,4523801,4523801,4720411,4720410,4917020,4982557,5179679,5245215,5573155,5638948,5835813,5901350,6032679,6163753,6163753,6295081,6426154,6491691,6688300,6819630,6885166,7081776 ,7212848,7278385,7344434,7343921,7540531,7606068,7671604,7737141,7802678,7802678,7802679,7868215,7868215,7802678,7802678,7802677,7737141,7737140,7671604,7671603,7606067,7606066,7606066,7540530,7540273,7540273,7474736,7474736,7474736,7408943,7408943,7 343406,7277869,7277869,7212332,7212075,7146539,7081002,7015465,6949673,6884136,6753063,6687527,6621990,6490661,6425125,6294052,6228259,6162979,6031650,5900577,5835041,5703455,5572383,5506846,5375773,5310237,5179164,5048091,4982554,4851225,4720152,458 9080,4458007,4392471,4261398,4130325,4064789,3999252,3868180,3802643,3671570,3540498,3474705,3343631,3212559,3081486,3015950,2884877,2753804,2687756,2556683,2491146,2360073,2294537,2228999,2228999,2294535,2294535,2294535,2425607,2491143,2556679,26877 51,2753289,2884361,2949898,3080971,3146507,3277580,3343116,3277580,3277580,3212044,3212045,3146508,3147021,11114138,15789549,16382200,10192265,3343886,3343629,3278"
FileWrite $R0 "094,3409167,3474959,3606033,3671826,3933973,4000022,4131352,4328217,4459290,4525083,4656156,4787228,4853021,4984094,4984351,5115423,5115423,5050143,5246754,5181217,5312291,5246754,5246754,5378339,5509412),#(3999508,4130582,3868179,4130581,3999252,41 30582,4130581,4261654,4327191,4327191,4589337,4523801,4851995,4851483,5048093,5113630,5376545,5442081,5704484,5770277,5901350,6032679,6098216,6295081,6294825,6557227,6557227,6754093,6819630,7016239,7081776,7278385,7343921,7409457,7540531,7540531,7671 604,7803191,7868727,9782113,11497608,12883623,12421532,10969467,8923468,7934263,7868215,7868214,7868214,7802677,7737140,7737140,7737139,7671603,7671603,7606066,7606066,8925776,15655398,15655397,14072002,7474736,7474735,7408943,7408942,7343405,7277869 ,7277868,7212075,7146539,7146539,7015466,7015465,6949673,6818600,6818599,6687271,6621734,6490661,6425125,6359588,6228259,6162723,6031650,5966113,5834529,6099240,11372434,14799831,16052208,15722730,9858169,9528947,15327459,15327459,8673637,4523543,445 8007,4261398,4130326,4064789,3999252,3868180,3737107,3605778,3474705,3409167,3278095,3147023,3081486,2949901,2818829,2753292,2622219,2491146,2360074,2294537,2228999,2228999,2228999,2228999,2228999,2360071,2360071,2491143,2556679,2622217,2753289,28843 62,2949898,3080971,3212044,3343116,3212044,3277581,3146508,3146508,3080971,3080972,3146508,3081484,12233903,16777215,6570825,3147021,3212557,3212558,3343631,3343630,3540497,3737362,3868436,4131094,4131351,4393753,4524827,4655899,4721692,4853021,49840 94,5049631,5115423,5181215,5181217,5246753,5246753,5377827,5312803,5443875,5443875,5640485),#(4130582,4065045,4130582,4130581,4065044,4130582,4261655,4130582,4458776,4458264,4655386,4654873,4851483,5114142,5179679,5442081,5573155,5770277,5770277,5966 886,6032679,6163752,6229289,6426154,6491690,6688300,6754093,6950702,7081775,7212848,7278385,7409457,7540531,7540531,7540531,7672117,7803190,8990288,14203333,16777215,16777215,16777215,16777215,16777215,16446967,12025235,8066107,7933751,7868214,786821 4,7802677,7802676,7737140,7737140,7737139,7671603,7671602,9188948,16777215,16777215,14995671,7540272,7540272,7474735,7474735,7408942,7408942,7408942,7343405,7343148,7277612,7277612,7212075,7146539,7080746,7015210,6949673,6818600,6753064,6687271,66217 34,6490662,6359589,6294053,6162723,6031651,12096671,16777215,16777215,16777215,16645372,11043469,10253183,16777215,16777215,9397617,4720153,4589080,4523544,4392471,4261398,4130325,3999252,3867923,3737106,3605778,3474705,3343631,3212559,3147022,301543 8,2884365,2753292,2622219,2556683,2425610,2294537,2228999,2228999,2228999,2228999,2228999,2294535,2360071,2425607,2491143,2556681,2622217,2753290,2818826,3015435,3080972,3212044,3146508,3146508,3146508,3080972,6900560,11312287,7690334,7822177,1499952 0,16777215,5320245,3147021,3212557,3147021,3278094,3278094,3474959,3474959,3737105,3802899,4065557,4131351,4393497,4459290,4721692,4787228,4918557,5049630,5180959,5246753,5312033,5312290,5312290,5509411,5377827,5574949,5509412,5640485),#(4130582,4065 045,4261655,4130582,4130581,4130582,4327192,4261655,4458777,4458264,4786459,4983069,4983069,5310751,5376545,5573411,5704484,5901350,5901349,6032423,6163751,6294825,6360361,6557227,6754093,6819629,7081775,7147312,7212848,7343921,7343921,7540531,760606 7,7671605,7671604,7868727,8330305,15721447,16777215,16777215,15721191,13410994,14005184,16645116,16777215,16777215,12751267,7999799,7934263,7933750,7868214,7868213,7802677,7802676,7802676,7737139,7737139,8001338,9518940,9518940,9123155,7605809,760580 9,7605809,7605808,7605808,7540015,7540015,7540015,7540015,7474478,7474478,7474478,7408685,7343148,7277612,7212075,7081002,7015210,6884137,6818601,6753064,6621735,6490662,6425126,6294053,15590374,16777215,16183795,7087676,5769506,6231597,10449793,1677 7215,16777215,9528690,4982299,4851226,4654617,4589081,4458008,4261399,4130326,4064789,3933460,3736851,3671314,3474705,3343631,3212047,3080974,2949901,2818828,2687756,2622219,2491146,2360073,2229001,2228999,2228999,2228999,2294535,2294535,2360071,2425 609,2425609,2491145,2556682,2622217,2753290,2884363,2949900,3080972,3080971,3080972,3080972,2949900,6439496,15855599,16777215,16777215,16052978,9007477,2950413,3147021,3015949,3147021,3212558,3212558,3343630,3409167,3606031,3606033,3868435,3999509,43 27703,4393753,4590363,4721691,4852764,5049630,5180702,5246495,5312031,5443362,5508898,5508899,5443363,5706021,5574949,5771558),#(4130583,4130582,4262168,4130582,4261655,4130582,4393240,4392727,4655386,4654873,4851995,5114398,5179679,5442082,5573411,5 704740,5704484,5901349,6032422,6163751,6294824,6426154,6688556,6753836,6950702,7081775,7212848,7343921,7343920,7540530,7540531,7671604,7737141,7868727,7868215,7999801,12948903,16777215,16777215,14863059,8658500,8196923,8196666,10045286,16645372,16777 215,16645372,9649501,7999799,8263484,13081258,13081258,11827855,7934262,10838136,12883622,9452633,8198973,12949929,12949929,11564168,7737138,7737138,7736882,8066873,11959953,13873853,15061207,14137282,12356251,8331070,7671088,7605551,7605551,10838905 ,12884390,12818598,8530502,10906238,13676987,14402764,12160412,7346228,6687528,7743039,12425124,16711422,16777215,15788010,12228514,11569558,5769506,10515330,16777215,16777215,9659764,5113629,4982556,9595510,12362667,13482944,14208207,13549507,122979 00,8148320,4065047,3802387,3671314,5515572,11113882,11048345,7492955,5979203,11443874,13287875,10390929,3413018,2294537,6441807,11444900,13222338,9733254,2821137,2360071,2425609,2425609,2491145,6177864,11181471,13485254,13682633,11707558,6242118,2949 899,2949900,3015435,2949899,2949900,2950412,4135715,4530471,3081999,2949899,2950412,3015948,3015949,3147021,3081486,3212557,3278094,3343631,3540495,3540495,3737103,3868435,4130580,4262167,4524569,4590362,4852764,4983837,5115166,5246495,5377567,550889 8,5574434,5574435,5574436,5771557,5706020,5837350),#(4131095,4130583,4327705,4130582,4327704,4261655,4524313,4458264,4654874,4983325,4983069,5311007,5376545,5639203,5704483,5835812,5967142,6032422,6295080,6360361,6557227,6622763,6819629,6950702,71473 11,7278384,7343920,7474994,7474994,7540530,7737141,7737140,7868215,7934263,8065337,8196666,15919083,16777215,16777215,10374765,8262460,8262459,8262459,8196666,13608886,16777215,16777215,12553118,8065336,8461633,16777215,16777215,15589091,14797522,167 77215,16777215,10706036,8660294,16777215,16777215,14401224,7868212,7868211,8923979,15655398,16777215,16777215,16777215,16777215,16777215,16051439,9584219,7802417,7736881,13345456,16777215,16777215,15721447,16777215,16777215,16777215,16777215,13874880 ,6949674,8797011,16777215,16777215,16777215,16777215,16777215,15788267,6031651,10712195,16777215,16777215,9791093,5375775,5179166,15063774,16777215,16777215,16777215,16777215,16777215,16777215,11573407,3998997,3867412,7095632,16777215,16777215,153945 35,16711422,16777215,16777215,16777215,13748682,11839658,16777215,16777215,16777215,16777215,11379107,2294535,2425607,2425609,11049628,16777215,16777215,16184821,16382200,16777215,16777215,8678769,2818828,2884363,2818827,2884363,2818827,2818827,27532 91,2753291,2818828,2884364,2950412,2950413,3081485,3081485,3147022,3212558,3343630,3343630,3474959,3540495,3737105,3802897,3999508,4327702,4524569,4786971,4852764,5049373,5180959,5377567,5508641,5574178,5639972,5771044,5836580,5771557,5968422),#(4262 168,4327961,4262168,4130583,4393241,4393240,4655642,4852252,4851996,5179935,5245471,5507874,5573667,5704740,5836069,5966885,6098215,6163751,6426153,6491690,6688300,6884908,7081774,7147311,7278384,7343920,7474994,7540531,7671604,7671604,7868215,793375 1,8065337,8065593,8131130,8790343,16777215,16777215,16777215,8724293,8327996,8327995,8327995,8262459,11892621,16777215,16777215,14005184,8131128,8527170,16777215,16777215,16777215,16777215,16380917,16513016,10771573,8725831,16777215,16777215,14401481 ,7933749,7933749,14335174,16777215,16777215,12025490,9055053,11233151,16711422,16777215,15193307,8065334,7867954,13345712,16777215,16777215,14929621,11894416,12686499,16645372,16777215,16777215,7806522,7477558,9786473,16777215,16777215,15524581,95896 07,9128800,6228261,10777731,16777215,16777215,9987702,5637921,5506847,11241363,9132907,6827071,6563899,8607075,15657194,16777215,16645372,4656415,4064022,7226705,1"
FileWrite $R0 "6777215,16777215,15723500,10521233,9731459,15987185,16777215,16777215,14538969,9206398,10391441,16711422,16777215,16382457,2360073,2360071,7626595,16777215,16777215,8284525,3083025,3412247,13880269,16777215,16119028,3478298,2753291,2687755,2753291,2 687755,2687755,2753291,2753291,2818828,2753291,2818828,2884364,3015949,3015949,3147022,3212558,3278094,3278094,3474959,3474959,3606031,3737103,3933971,3999507,4262166,4655641,4786971,5049373,5180702,5311775,5508641,5639969,5771044,5836580,5837092,596 8166,6033959),#(4131096,4393498,4327705,4327704,4524314,4524313,4720923,5048862,5048862,5376801,5442594,5639204,5770532,5836068,6032678,6098214,6294824,6360360,6557226,6819628,6950701,7081774,7212847,7212847,7474993,7474994,7671603,7671604,7868215,78 68214,8065337,8065336,8130873,8196666,8262203,9516632,16777215,16777215,16513017,8327996,8327996,8327996,8327995,8262459,11232383,16777215,16777215,14797010,8131129,8592963,16777215,16777215,15258843,8725318,8065335,8065591,8197177,8791624,16777215,1 6777215,14401481,8064822,8527425,16777215,16777215,15456992,8064822,8064821,8064821,14400968,16777215,16777215,9385300,7933490,13411248,16777215,16777215,9583962,7605294,7539758,14335944,16777215,16777215,8927828,7014953,6883881,16711422,16777215,149 96697,6490406,6424871,6358822,10777476,16777215,16777215,10053239,5703458,5637922,5572385,6166062,8802915,10648712,11637404,15261666,16777215,16777215,6367805,4392217,7488852,16777215,16777215,10981271,3539731,3408657,11179676,16777215,16777215,72963 48,2555915,2359303,14012111,16777215,16777215,3610654,2360071,12893117,16777215,16447993,8152682,8152682,8218475,12563638,16777215,16777215,5848642,2622731,2556683,2557195,2556682,2556683,2622218,2622219,2753291,2753291,2818828,2818828,2884877,295041 2,3015949,3147021,3147022,3343630,3278351,3409423,3606031,3671567,3868178,3868177,4130580,4458262,4590104,4918043,5049373,5311775,5443103,5574433,5771043,5836579,5968165,6099238,6033702),#(4262169,4459035,4459033,4655899,4721179,4917789,4983325,53112 65,5376801,5573667,5639203,5770532,5901606,5967141,6164007,6229287,6491690,6688555,6819628,7016238,7147311,7212847,7409456,7409457,7606067,7671604,7737140,7868214,7933751,8065336,8130873,8196666,8196666,8262459,8327995,8525631,16645116,16777215,16777 215,9119821,8327995,8327995,8327995,8327995,12156821,16777215,16777215,13542836,8262202,8658499,16777215,16777215,14797008,8131128,8131127,8131127,8065591,8857160,16777215,16777215,14467017,8130871,9912672,16777215,16777215,14203075,8064821,8130357,7 999284,13147051,16777215,16777215,10771060,7933234,13410992,16777215,16777215,9649242,7736111,7605038,13477811,16777215,16777215,9256279,7145770,7080234,16711422,16777215,15062233,6686504,6555431,6424358,10843012,16777215,16777215,10118519,5965604,60 31141,11372180,16645629,16777215,16777215,16777215,16777215,16777215,16777215,6629950,4654363,7685462,16777215,16777215,11112601,3867414,3670804,10257291,16777215,16777215,7492957,2818061,2621452,13090239,16777215,16777215,3939106,2490377,15263205,16 777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,7362910,2557195,2491146,2491659,2425610,2425611,2425610,2425610,2622219,2622219,2753292,2819340,2819341,2950413,2950413,3081485,3081486,3278094,3278351,3474703,3540495,3606031,3737 103,3802639,4065043,4130579,4392725,4721177,4918043,5245982,5377311,5574175,5770786,5902115,6033701,6098726,6164774),#(4393498,4590364,4590107,4852509,4786716,5114655,5179935,5508131,5573924,5704997,5836070,5901606,6098471,6164007,6360617,6491689,668 8299,6950701,7081774,7147310,7343920,7343920,7474993,7606067,7606067,7802678,7933750,8065336,8065336,8131130,8196666,8262203,8262202,8262459,8327995,8327995,15324893,16777215,16777215,11760523,8327995,8327995,8327995,8328252,15060695,16777215,1677721 5,12090513,8327994,8724292,16777215,16777215,14797009,8196664,8196664,8196663,8261943,9053770,16777215,16777215,14467017,8327479,9317967,16777215,16777215,14599117,8130357,8064565,8130101,13608628,16777215,16777215,10110308,7998515,13410992,16777215, 16777215,9714777,7801391,7735855,13411249,16777215,16777215,9387096,7341868,7210795,16711422,16777215,15062234,6817576,6686504,6555175,10973828,16777215,16777215,10249336,6096420,10381949,16777215,16777215,13745091,8142163,6297137,12756656,16777215,1 6777215,6761023,4850974,7816535,16777215,16777215,11309210,4129561,4064023,10388107,16777215,16777215,7689567,3145743,2949134,13024190,16777215,16777215,4135716,2686987,14143697,16777215,16514043,5979716,5782079,5847871,5782335,5847871,5782335,367567 7,2557194,2491659,2426123,2360586,2360587,2360074,2294538,2491147,2491147,2622732,2622219,2753804,2818828,2819340,3015949,3081486,3212557,3278094,3474703,3409423,3540495,3737103,3737103,3999249,3999506,4327188,4458774,4721176,5114652,5245982,5574175, 5639970,5836579,6098725,6164261,6296103),#(4524571,4786973,4786973,4983583,5048863,5377058,5442595,5704997,5836326,5901862,6032935,6098472,6295081,6426153,6623019,6819628,6950701,7147310,7278383,7278383,7409456,7540530,7606066,7802677,7802677,7999288 ,8065336,8130873,8196666,8196666,8196666,8262459,8327995,8327995,8327995,8327995,11100283,16777215,16777215,16183282,10836341,8459581,8789829,13146282,16777215,16777215,15918570,8855366,8328251,8855365,16777215,16777215,14797009,8327737,8327737,83277 37,8327738,9184843,16777215,16777215,14532553,8326968,8326968,16051182,16777215,16513016,9185357,8260918,8788801,15984876,16777215,16513273,8723007,8129332,13476272,16777215,16777215,9845851,7998002,7997745,13476785,16777215,16777215,9648985,7669550, 7538477,16711422,16777215,15127770,7079723,6948393,6817321,11104902,16777215,16777215,10380409,6358311,12359332,16777215,16777215,9261416,5899044,5702435,13349307,16777215,16777215,6957378,5112607,8013144,16777215,16777215,11374491,4391707,4326171,10 519181,16777215,16777215,8017251,3538965,3342355,13155263,16777215,16777215,4332325,2883598,11114652,16777215,16777215,9600899,2884364,2753292,2753291,3609370,9732485,4334376,2557195,2491659,2426122,2360586,2295051,2229514,2163978,2294539,2360074,249 1147,2556683,2622732,2753292,2753804,2950413,2950412,3147021,3212558,3343630,3409422,3540495,3606031,3737103,3868175,3933713,4130579,4261652,4589333,4917785,5114651,5442847,5574177,5901858,6098724,6164260,6295333),#(4786973,4918046,5180449,5245986,55 73925,5639461,5836327,5836326,6032936,6098472,6295081,6360617,6557483,6754092,6885165,7081774,7147311,7278383,7474993,7474993,7540530,7737141,7737140,7933751,7999287,8130873,8196409,8196409,8262202,8262203,8262459,8262458,8327995,8327995,8327995,8327 995,8327995,13674422,16777215,16777215,16777215,16513017,16776958,16777215,16777215,16645116,10967157,8590396,8590396,8986438,16777215,16777215,14862545,8524347,8589883,8524090,8524091,9184588,16777215,16777215,14532297,8326968,8326967,11362941,16777 215,16777215,16116719,14268099,15918569,16777215,16777215,12221587,8325942,8325942,13541810,16777215,16777215,9976925,8260147,8259891,13607858,16777215,16777215,9911132,7997233,7866160,16711422,16777215,15193306,7407149,7341613,7210540,11301511,16777 215,16777215,10642555,6619945,10577276,16777215,16777215,15788267,13150645,14667477,16777215,16777215,16777215,7153731,5374754,8209498,16777215,16777215,11505563,4719391,4588317,10650254,16777215,16777215,8279653,3932185,3735575,13220800,16777215,167 77215,4660009,3211279,4134177,15262692,16777215,16777215,15262692,13155775,14406869,16514043,16777215,5189942,2622219,2425609,2426123,2360586,2295051,2229514,2163978,2163979,2229002,2295051,2360075,2557196,2622731,2688268,2884877,2884877,3081486,3147 022,3343630,3343630,3540495,3606031,3671567,3868177,3933713,4130578,4130579,4458260,4589846,4917784,5049115,5508126,5574175,5967651,6033187,6426919),#(5114911,5180193,5508132,5573925,5836328,5901863,5967400,6098473,6229802,6491948,6557483,6754093,681 9629,7016751,7147311,7278383,7278382,7409456,7540530,7671604,7671604,7933751,7933751,8064823,8130873,8130873,8262202,8327738,8327739,8327995,8327996,8327995,8459068,8459067,8459067,8459067,8459067,8459068,11297406,15588835,16776958,16777215,16777215, 16512760,14664397,10504040,8721470,8721469,8721214,9183047,16777215,16777215,14928082,8720956,8655164,8720700,8589115,9381196,16777215,16777215,14597834,8523321,85"
FileWrite $R0 "23064,8457528,11362173,15918826,16777215,16777215,16777215,16248818,12087691,8719417,8653625,8653624,13672882,16777215,16777215,10239071,8522294,8587574,13673396,16777215,16777215,10173534,8259379,8193843,16711422,16777215,15258843,7735088,7604015,7 472942,11563657,16777215,16777215,10839420,7013675,7013933,13017006,16777215,16777215,16711422,13282488,13810115,16777215,16777215,7416134,5571364,8340829,16777215,16777215,11571357,4981535,4850463,10846864,16777215,16777215,8476263,4260636,4064027,1 3351873,16777215,16777215,4922157,3473428,3342354,4726058,11245726,16316407,16777215,16777215,16777215,16447993,13023933,4135714,2622219,2491146,2491147,2294538,2229002,2163466,2163979,2032906,2032906,2229515,2295051,2229515,2426123,2491660,2753804,2 819341,3015950,3081485,3147022,3343630,3474959,3540495,3671567,3737103,3868175,3868177,4130578,4392723,4458261,4785941,4852248,5311260,5442846,5836322,5901858,6229796),#(5442851,5508133,5836327,5901864,6098730,6032937,6229802,6491948,6491948,6754094, 6819630,6950703,7082287,7278896,7278383,7409456,7474993,7671603,7671604,7868214,7868214,7999287,8130872,8130873,8262203,8261947,8327739,8327996,8327996,8459068,8459068,8459068,8459068,8590141,8590141,8590141,8590141,8655678,8721215,8786751,9116998,10 370658,9843031,8983873,8852543,8918079,8918079,8917823,8983359,8917823,8917567,8917311,8917310,8851774,8851262,8851261,8785725,8719932,8785467,8719931,8719674,8785211,8850747,8785211,8850747,8982077,9774673,10765417,9906772,8981821,8981564,8981307,89 15771,8915770,8916027,8915770,8850233,8915770,8784440,8849976,8849976,8718647,8784183,8718646,8587062,8521525,8455989,8259379,8259379,8062770,7931698,7866162,7734832,7669296,7538223,7472431,7406895,7210286,7078701,7937089,8927063,7542587,6619947,6554 410,6357801,6226728,6161192,5964583,5833511,5636901,5571365,5374756,5309220,5178147,5047075,4916002,4784929,4719393,4522783,4457247,4326173,4259867,4128794,3997721,3866648,3735574,3670036,3473427,3474194,4791594,6043202,5186865,3672598,3145742,308097 3,2818828,2622218,2491147,2294538,2294537,2163466,2032394,2032906,2032906,2163979,2163978,2163979,2360587,2360588,2622732,2622732,2884877,3015949,3147022,3278094,3278094,3474959,3671567,3737103,3802641,3933713,4064785,4065042,4327187,4654868,4720919, 5048857,5245724,5704991,5836578,6229796),#(5770534,5901607,6164266,6164266,6295339,6491949,6491948,6689070,6819630,6950703,7082288,7279153,7278897,7475505,7475505,7737652,7737141,7737140,7868215,7999799,8130873,8261945,8327483,8327483,8458812,8458812 ,8524349,8524349,8590142,8590141,8590142,8655678,8655422,8655422,8786751,8852287,8852287,8983361,8983618,9114690,9114690,9114690,9114946,9114690,9180226,9114690,9114434,9114434,9114177,9114177,9113921,9113921,9113407,9113407,9047871,9047871,9047614,9 047614,8982077,9047614,9047358,9047357,9047358,9112894,9113150,9178686,9178687,9112894,9178430,9178430,9178174,9178173,9178174,9178173,9243453,9177917,9177916,9177660,9112123,9112123,9177659,9046330,9046329,8980793,8849207,8849207,8718135,8587062,852 1526,8324917,8259380,8128052,8062515,7931443,7865906,7669041,7603505,7472432,7340847,7275311,7144238,6947629,6947629,6751020,6619947,6619948,6423339,6292266,6161193,6030120,5964584,5767976,5636903,5505830,5440294,5309221,5112612,5047076,4916004,47849 30,4653855,4522783,4457246,4326172,4129563,4063258,3997720,3866647,3735573,3670036,3538963,3473425,3473425,3407887,3276815,3145741,2884364,2753292,2556683,2425610,2294538,2163466,2163978,2032906,2032906,2032906,2032907,2163979,2229515,2426124,2491660 ,2753805,2819340,3015950,3212558,3278094,3409166,3474959,3671567,3671567,3933713,4065042,3999506,4327187,4392723,4654869,4982550,5048857,5507868,5704991,6098468),#(6164266,6229802,6426412,6557485,6557485,6754606,6819631,7016752,7148082,7279154,747576 4,7541300,7541042,7737651,7737653,7737140,7999800,8065336,8261946,8327483,8458813,8589886,8589886,8655422,8655422,8720959,8720959,8721215,8721215,8786495,8852031,8852031,8917825,8983105,9048898,9114435,9245508,9245764,9311301,9376837,9376837,9376837, 9376837,9442372,9376837,9442116,9376323,9310787,9376067,9376067,9375554,9375554,9310017,9375554,9310017,9310017,9375554,9375553,9309759,9375551,9309761,9375295,9309759,9375297,9375295,9375039,9506113,9440577,9440575,9506111,9505857,9505855,9505855,95 05855,9505599,9505599,9440063,9505343,9439806,9439806,9374013,9308476,9308475,9242427,9176890,9045818,8914746,8849209,8783672,8652599,8587064,8455735,8324662,8193589,8127796,7996723,7931187,7799602,7668529,7537457,7406384,7275311,7144239,7013166,6947 630,6882094,6751022,6685486,6554412,6357804,6292268,6161194,5964586,5899050,5702441,5571368,5440295,5309223,5178151,5112613,5047076,4916003,4719393,4653855,4522782,4457245,4326171,4128794,4063257,3997719,3866646,3735572,3670036,3604499,3473426,340788 9,3276815,3014670,2818828,2622219,2425611,2294538,2229003,2032394,2163980,2032907,2032907,2032907,2163979,2229516,2360587,2622732,2688268,2950414,3015949,3147022,3278095,3409423,3540495,3671567,3868175,3868433,4130321,4261650,4261651,4523796,4654868, 4983064,5311002,5507869,6032673),#(6491949,6491949,6623022,6820143,6820143,7016753,7082289,7278899,7476021,7607093,7606837,7803446,7868726,7868726,8065337,8130872,8327484,8327740,8655423,8655423,8720959,8852031,8852289,8917826,8917569,8917569,8983106 ,8917567,8983105,9048641,9048642,9114178,9179715,9245508,9311045,9442373,9507910,9573447,9573447,9573447,9638983,9704520,9638984,9638984,9638984,9638726,9638726,9572933,9572677,9572676,9506628,9572164,9572164,9572164,9637700,9572163,9572164,9637700,9 637700,9637443,9637443,9702980,9637443,9702979,9637443,9702723,9702723,9702723,9702723,9702722,9768003,9768002,9768002,9767746,9767747,9767746,9702209,9701953,9701953,9701951,9636159,9570622,9439549,9439036,9373501,9242427,9176891,9045819,8980282,891 4745,8783674,8587064,8587064,8455991,8324662,8193589,8128053,7996724,7865651,7669043,7537970,7537458,7406385,7275313,7144240,7078704,6948144,6882096,6816559,6685486,6619951,6423342,6292269,6226733,6095659,5899051,5833514,5636906,5505833,5505832,52436 86,5243686,5112612,5047075,4916001,4784927,4653854,4522013,4390940,4325403,4128793,4063256,3997718,3866646,3735572,3604499,3538962,3342351,3145743,3015438,2753293,2491148,2360075,2163466,2163468,2032907,2032908,2032907,2032908,2163979,2229515,2360588 ,2491660,2753805,2884877,3081742,3212558,3278351,3474959,3606031,3802639,3802897,4130322,4065042,4130578,4523796,4589332,4851478,4917014,5310745,5770269),#(6754607,6885680,6885680,7082545,7147826,7344692,7541557,7607095,7803704,7934777,7934519,800005 5,8196666,8130873,8327740,8524348,8720959,8786497,8917569,9048899,9114435,9179972,9179971,9179972,9179716,9245252,9245252,9245252,9245252,9310789,9376325,9376581,9507654,9573192,9704520,9770313,9770313,9835594,9835593,9901130,9901130,9966666,9966666, 9901131,9966410,9966153,9900617,9834824,9768775,9834311,9768774,9834311,9899846,9834310,9899846,9834310,9899847,9834054,9899846,9899590,9899590,9965126,9899589,9899590,9964869,9899334,9899334,9964869,9899332,9964868,9964613,9964612,10030149,10030149, 9964356,9964356,9964355,9833026,9833282,9767745,9767487,9701951,9570878,9570622,9439550,9307964,9308476,9176892,8980283,9045818,8849210,8718138,8652601,8521272,8521272,8324663,8127798,8193334,7996726,7865140,7799603,7668531,7602994,7471923,7406387,73 41362,7209778,7144241,7013681,6882097,6816561,6620464,6554928,6423856,6292782,6226734,6095661,5964588,5899052,5833515,5636905,5571369,5440295,5309222,5243684,5112612,5047074,4849697,4784159,4653086,4522013,4390940,4259866,4128793,4063255,3866645,3801 108,3604499,3407889,3211279,3014671,2753294,2622221,2360076,2229004,2229004,2163468,2229517,2163981,2163980,2163979,2295052,2426124,2491661,2688269,2950414,3147022,3212815,3474959,3474959,3737103,3802641,4064783,4065042,4327186,4458259,4458259,478594 0,4851477,5179673,5507610),#(7016753,7148082,7213618,7410485,7541301,7672375,7935034,8066106,8000313,8196922,8262459,8261946,8524350,8524350,8786751,8917825,9048898,9179972,9245509,9311046,9376838,9442119,9507656,9442119,9507398,9572935,9572935,95729 35,9573192,9638728,9704521,9770058,9835594,9835851,9966923,9966667,10032204,10032204,10097741,10228813,10228813,10228813,10228557,10163020,10162764,10096971,100964"
FileWrite $R0 "All written!"
FileWrite $R0 "$\r$\n"
StrCpy $R4 1

Goto Loop
Done:
FileClose $R2
FileClose $R0

SetDetailsPrint none
Delete "${INIFile}"
Rename $R1 "${INIFile}"
SetDetailsPrint both


Does it look right?



THANKS!


FileWrite statements are only 1 line each in NSIS editor.


Try the new function:
http://nsis.sourceforge.net/WriteINILargeStr

-Stu


Hey,

It really works! Now I see a problem which I dont know the reason of. When I want to write into keys like "OFImage" or "Oimage", etc it doesnt work.

But it works with new.


Any idea?

THANKS!


Oh I know. I'll fix it now.
Edit: Fixed.
http://nsis.sourceforge.net/WriteINI...r#The_Function

-Stu


Thanks alot! I was wondering if it is possible to write strings from top to bottom, like?

text01
text02
text03
...

?


THANKS SO MUCH!


Done. Note new syntax:
http://nsis.sourceforge.net/WriteINILargeStr#Usage

-Stu


Afrow,

Thanks so much. It works so perfect now. But there always comes problems, but this time not from your code.

I use
WriteINIStr $INSTDIR\options.ini XSI OImage ""

first to clear the ini key but this doesnt clear the contents of it.

Any idea how to do this?


THANKS SO MUCH AGAIN!


That clears the OImage value. If you are trying to delete the OImage entry itself, try DeleteINIStr
If you want to remove the XSI section, try DeleteINISec


The function will clear the value first before writing to it.
By the way, just checking you are using the 8192 string length build?

-Stu


Hey Afrow,

Thanks. Yeah I use 8192 build now.

I will let you know if I see the problem again, as I try to initialize the value in my software using the INI key. If I can do it, I will focus on your function to see if I encounter any problem.


THANKS SO MUCH! Afrow and Dienjd, I really appreciate the effort!