Quantcast
Channel: Indigo Rose Software Forums - Forums
Viewing all articles
Browse latest Browse all 2105

Help me with IniFile.GetValue

$
0
0
Hi all,
I don't want to annoy everyone, but I have a desire to try out the code in my project.

So i populate ListBox1 Page on show:

Code:
ListBox.DeleteItem("ListBox1", LB_ALLITEMS);
tFiles = File.Find("Install", "*.exe", false, false, nil);
if tFiles then
for i,sFilePath in pairs (tFiles) do
tFileParts = String.SplitPath(sFilePath);
sFileName = tFileParts.Filename;
sFileExtension = tFileParts.Extension;
sFullFileName = sFileName..sFileExtension;
ListBox.AddItem("ListBox1", sFullFileName, sFilePath);
end
end
I check what i want and button on click:

Code:
local tChecked = ListBox.GetChecked("ListBox1", BST_CHECKED);
if tChecked then
for i = 1, #tChecked do
INIFile.SetValue("Install\\chess.bat", "run", i, ListBox.GetItemText("ListBox1", tChecked[i]));
end
end

Finally The Batch file creates into folder "Install" like this:
Code:
[run]
1=ChessEngineSetup1.exe
2=ChessEngineSetup2.exe
3=ChessEngineSetup3.exe


But i would like bat file to be like this:
Code:
Start /w ChessEngineSetup1.exe /S
Start /w ChessEngineSetup2.exe /S
Start /w ChessEngineSetup3.exe /S
Please can someone help me with code - button on click
How can i change 1= to ​Start /w and add to the end /S
Thanks in advance​

Viewing all articles
Browse latest Browse all 2105

Trending Articles