Created
March 2, 2015 04:53
-
-
Save ttdoda/d0705aac8503a2ca3e9e to your computer and use it in GitHub Desktop.
俳句表示マクロ (要Tera Term 4.86)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
strdim haiku 3 | |
haiku[0] = "古池や 蛙飛び込む 水の音" | |
haiku[1] = "柿食えば 鐘が鳴るなり 法隆寺" | |
haiku[2] = "松島や ああ松島や 松島や" | |
; 端末初期化 | |
; カーソル非表示(#27"[?25l")、代替スクリーンへ変更(#27"[?1049h") | |
; 左右マージンモード有効(#27"[?69h")、画面消去(#27"[2J") | |
dispstr #27"[?25l" #27"[?1049h" #27"[?69h" #27"[2J" | |
pause 1 | |
for i 0 10 | |
random val 3 | |
h = haiku[val] | |
strsplit h " " | |
msg = groupmatchstr1 | |
call disp | |
msg = groupmatchstr2 | |
call disp | |
msg = groupmatchstr3 | |
call disp | |
msg = "" | |
call disp | |
next | |
; 終了処理 | |
pause 1 | |
; 右マージンクリア(#27"[s")、左右マージンモード無効(#27"[?69l") | |
; 通常スクリーンへ変更(#27"[?1049l")、カーソル表示(#27"[?25h") | |
dispstr #27"[s" #27"[?69l" #27"[?1049l" #27"[?25h" | |
end | |
:disp | |
; 左上にカーソル移動(#27"[H")、右マージンをクリア(#27"[s")、 | |
; 画面全体を右に移動(#27"6")x4、右マージンを2桁目に再設定(#27"1;2s") | |
dispstr #27"[H" #27"[s" #27"6" #27"6" #27"6" #27"6" #27"[1;2s" | |
dispstr msg | |
pause 1 | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment