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