外部変形は データのやり取りをテキストファイルで行うので プログラム言語は 自由に選ぶことができます。図形は機能的かつシンプルなため、数多くのユーザーに受け入れられています。
mshtaで線角を計算する(lnslope)
:mshtaで線角を計算する(lnslope)
@echo off
if exist jwc_temp.txt (
copy jwc_temp.txt myfiles > nul
mshta %~f0 < myfiles > jwc_temp.txt
)
goto:eof
REM #jww
REM #1ln 基準線を指示してください
REM #e
<script>
with (new ActiveXObject("Scripting.FileSystemObject")) {
f = GetStandardStream(0) //stdin
g = GetStandardStream(1) //stdout
with (Math) {
while (! f.AtEndOfStream) {
F = ($_ = f.ReadLine()).split(/\s+/)
if (/^\s+/i .test($_)) { //ln 指示線
lx = F[2] - F[0]
ly = F[3] - F[1]
d = atan2(ly, lx) * 180 / PI
}
}
f.close()
g.WriteLine("h#∠ = " + d.toFixed(3) + "゚")
}
}
close()
</script>