#PY = loaddll( hidemarudir + @"\hmPy.dll" );
#_ = dllfuncw( #PY, "DoString", R"IRONPYTHON(
lineno = hm.Edit.MousePos.lineno;
column = hm.Edit.MousePos.column;
hm.debuginfo( str(lineno) + "," + str(column) );
)IRONPYTHON");
freedll( #PY );
8.66の機能を利用した簡易なHTMLエンコードの例
#PY = loaddll( hidemarudir + @"\hmPy.dll" );
if (! #PY) {
message("hmPYが導入されいません。");
endmacro;
}
#_ = dllfuncw( #PY, "DoString", R"IRONPYTHON(
import clr
clr.AddReferenceByPartialName("System.Web")
import System
html = 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
)IRONPYTHON"
);
freedll( #PY );