外部変形は データのやり取りをテキストファイルで行うので プログラム言語は 自由に選ぶことができます。図形は機能的かつシンプルなため、数多くのユーザーに受け入れられています。
mshtaで点データを確認する(pt)
:mshtaで点データを確認する(pt)
@echo off
if exist jwc_temp.txt (
copy jwc_temp.txt myfiles > nul
mshta %~f0 < myfiles > jwc_temp.txt
)
goto:eof
REM #jww
REM #h1
REM #g1
REM #hc 点と点マーカを選択してください
REM #bz
REM #e
<script>
pt = []
ptn = 0
with (new ActiveXObject("Scripting.FileSystemObject")) {
f = GetStandardStream(0) //stdin
g = GetStandardStream(1) //stdout
while (! f.AtEndOfStream) {
F = ($_ = f.ReadLine()).split(/\s+/)
if (/^hq/i .test($_)) { //hq
g.WriteLine("bz"); continue
}
if (/^hk/i.test($_)) { //hk 軸角
hk = F[1] * 1.0; continue
}
if (/^pt/i.test($_)) { //pt 点と点マーカデータ
ptn += 1
if (pt[ptn] = F.slice(1)) for (j = 0; j < pt[ptn].length; j++) pt[ptn][j] *= 1.0;
}
}
f.close()
if (ptn > 0) {
g.WriteLine("cc4")
g.WriteLine("cn0 5 5 0.5 2")
lx = Math.cos(hk * Math.PI / 180)
ly = Math.sin(hk * Math.PI / 180)
for (i = 1; i <= ptn; i++) {
x = pt[i][0]
y = pt[i][1]
g.WriteLine(["ch", x, y, lx, ly, "\"ようこそ ありがとう"].join(" "))
}
}
}
close()
</script>