#MNG = loaddll( hidemarudir + @"\hmLN.dll" );
#_ = dllfuncw( #MNG, "DoString", R"MNG(
lineno = hm.Edit.MousePos.lineno;
column = hm.Edit.MousePos.column;
hm.debuginfo( tostring(lineno) .. "," .. tostring(column) );
)MNG");
freedll( #MNG );
8.66の機能を利用した簡易なHTMLエンコードの例
#MNG = loaddll( hidemarudir + @"\hmLN.dll" );
if (! #MNG) {
message("hmLNが導入されいません。");
endmacro;
}
#_ = dllfuncw( #MNG, "DoString", R"MNG(
clr.System.Reflection.Assembly:Load("System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
html = clr.System.Web.HttpUtility.HtmlEncode(hm.Edit.TotalText)
html = html.Replace("\r\n", "\r")
html = html.Replace("\n", "\r")
html = html.Replace("\r", "<br>\r\n")
html = html.Replace(" ", " ")
hm.Edit.TotalText = html
)MNG"
);
freedll( #MNG );