#RB = loaddll( hidemarudir + @"\hmRb.dll" );
#_ = dllfuncw( #RB, "DoString", R"IRONRUBY(
lineno = $hm.Edit.MousePos.lineno;
column = $hm.Edit.MousePos.column;
$hm.debuginfo( lineno.to_s + "," + column.to_s );
)IRONRUBY");
freedll( #RB );
簡易なHTMLエンコードの例
#RB = loaddll( hidemarudir + @"\hmRb.dll" );
if (! #RB) {
message("hmRBが導入されいません。");
endmacro;
}
#_ = dllfuncw( #RB, "DoString", R"IRONRUBY(
load_assembly("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
)IRONRUBY"
);
freedll( #RB );