Reputation: 111
Is it possible to build a script line using a variable and some conditions (have executable that requires different switches depending on what is checked on a custom page. Possibly something like this:
var
linecommand : string;
function FileParams();
begin
if check1 then linecommand := linecommand+' conditionone' end;
if check2 then linecommand := linecommand+' conditiontwo' end;
if check3 then linecommand := linecommand+' conditiontwo' end;
end;
function check123()
begin
if check1 or check2 or check3 then
begin
linecommand='Executable file name.exe '+linecommand;
Shellexec(linecommand);
end;
end;
Upvotes: 1
Views: 200
Reputation: 13095
You can use a {code:...}
constant to insert a value calculated in a [Code]
function into a specific value within a standard entry that accepts both strings and constants (such as the Parameters
value of a [Run]
entry).
Or you can write multiple entries and use a Check
function to determine which (if any) of them actually get executed.
Upvotes: 2