Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions UDL-samples/HomeMatic_Script_byMichaelN0815.hsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
! HomeMatic Script sample for Notepad++ UDL testing

object sysVars = dom.GetObject(ID_SYSTEM_VARIABLES);
string id;

foreach (id, sysVars.EnumIDs()) {
object sysVar = dom.GetObject(id);
WriteLine(sysVar.Name() # " = " # sysVar.Value());
}

object programs = dom.GetObject(ID_PROGRAMS);
WriteLine("Programs: " # programs.Count());

real azimuth = system.SunAzimuth();
real altitude = system.SunAltitude();

if (altitude > 0.0) {
WriteLine("Sun above horizon");
} elseif (altitude == 0.0) {
WriteLine("Sun at horizon");
} else {
WriteLine("Sun below horizon");
}

WriteLine("Sunrise: " # system.SunriseTime());
WriteLine("Sunset: " # system.SunsetTime());
65 changes: 65 additions & 0 deletions UDLs/HomeMatic_Script_byMichaelN0815.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<UserLang name="HomeMatic Script" ext="hsc hm fn" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">03 04 00! 00 01 02</Keywords>
<Keywords name="Numbers, prefix1" />
<Keywords name="Numbers, prefix2" />
<Keywords name="Numbers, extras1" />
<Keywords name="Numbers, extras2" />
<Keywords name="Numbers, suffix1" />
<Keywords name="Numbers, suffix2" />
<Keywords name="Numbers, range" />
<Keywords name="Operators1">- # % &amp; ( ) * . / ; [ ] | + &lt; = &gt;</Keywords>
<Keywords name="Operators2" />
<Keywords name="Folders in code1, open">{</Keywords>
<Keywords name="Folders in code1, middle" />
<Keywords name="Folders in code1, close">}</Keywords>
<Keywords name="Folders in code2, open" />
<Keywords name="Folders in code2, middle" />
<Keywords name="Folders in code2, close" />
<Keywords name="Folders in comment, open" />
<Keywords name="Folders in comment, middle" />
<Keywords name="Folders in comment, close" />
<Keywords name="Keywords1">else elseif false foreach if null true while Write WriteLine WriteURL quit</Keywords>
<Keywords name="Keywords2">boolean idarray integer real string time var object</Keywords>
<Keywords name="Keywords3">Address Channel Channels ChnGroupPartnerId ChnDirection Direction ChnAESActive AESActive ChnArchive ChnRoom ChnFunction Count Date Device DPs DPByHssDP Exec EnumUsedIDs EnumUsedNames Get GetAt GetObject GetVar Find Format ID IsTypeOf IsVar Interface HssType LastValue Length Name Operations ProgramExecute Split State StrValueByIndex Substr Timestamp ToFloat ToInteger ToString ToTime Type TypeName Value ValueType Variable VarType Contains StartsWith EndsWith UriEncode UriDecode ToUTF8 ToLatin ToUpper ToLower Trim LTrim RTrim Replace Year Month Day Hour Minute Second Week Weekday Yearday IsLocalTime IsDST Abs Mod Min Max Exp Exp2 Exp10 Expm1 Log Log2 Log10 Log1p Sqrt Cbrt Pow Sin Cos Tan Asin Acos Atan Sinh Cosh Tanh Asinh Acosh Atanh Ceil Floor Trunc Round Random Srandom ProgramLastExecuteTime DPInfo ValueUnit ValueMin ValueMax ValueSubType EnumIDs ValueList SunAzimuth SunAltitude MaxIterations SunriseTime SunsetTime CreateObject</Keywords>
<Keywords name="Keywords4">OT_OBJECT OT_ENUM OT_DEVICE OT_CHANNEL OT_DP OT_VARDP $this$ $src$ OPERATION_READ OPERATION_WRITE OPERATION_EVENT dom system M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4 M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2 ID_SYSTEM_VARIABLES ID_PROGRAMS</Keywords>
<Keywords name="Keywords5" />
<Keywords name="Keywords6" />
<Keywords name="Keywords7" />
<Keywords name="Keywords8" />
<Keywords name="Delimiters">00" 01\ 02" 03 04 05 06' 07\ 08' 09 10 11 12^ 13 14^ 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="1A1A1A" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="6B7280" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="6B7280" bgColor="F5F5F5" fontStyle="0" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="175E8A" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="005CC5" bgColor="FFFFFF" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="9A4D00" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="6F42C1" bgColor="FFFFFF" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="B42318" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="9A4D00" bgColor="FFFFFF" fontStyle="1" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="087E3E" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="087E3E" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="087E3E" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
9 changes: 9 additions & 0 deletions udl-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,15 @@
"autoCompletion": "HLSL",
"autoCompletionAuthor": "generate_ac.py"
},
{
"id-name": "HomeMatic_Script_byMichaelN0815",
"display-name": "HomeMatic Script",
"version": "v1.00",
"sample": "HomeMatic_Script_byMichaelN0815.hsc",
"repository": "",
"description": "HomeMatic Script (ReGa) syntax highlighting for HomeMatic CCU automation scripts",
"author": "MichaelN0815"
},
{
"id-name": "HQL_byAkeelUdar",
"display-name": "HQL for Notepad++",
Expand Down