1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
-- Simple example of how to write wdx-scripts
function ContentSetDefaultParams(IniFileName,PlugApiVerHi,PlugApiVerLow)
--Initialization code here
end
function ContentGetSupportedField(Index)
if (Index == 0) then
return 'FieldName0','', 8; -- FieldName,Units,ft_string
elseif (Index == 1) then
return 'FieldName1','', 8;
elseif (Index == 2) then
return 'FieldName2','', 8;
end
return '','', 0; -- ft_nomorefields
end
function ContentGetDefaultSortOrder(FieldIndex)
return 1; --or -1
end
function ContentGetDetectString()
return '(EXT="TXT") | (EXT="INI")'; -- return detect string
end
function ContentGetValue(FileName, FieldIndex, UnitIndex, flags)
if (FieldIndex == 0) then
return "FieldValue0"; -- return string
elseif (FieldIndex == 1) then
return "FieldValue1";
elseif (FieldIndex == 2) then
return "FieldValue2";
end
return nil; -- invalid
end
--function ContentGetSupportedFieldFlags(FieldIndex)
--return 0; -- return flags
--end
--function ContentStopGetValue(Filename)
--end
|