#module
#deffunc getcaretpos val, int
mref pary, 48 : mref id, 1
objsend id, 0x00B0, , nonuse
pary = stat & 0xFFFF, stat >> 16
return
#deffunc setcaretpos int, int, int
mref id, 0 : mref ps, 1 : mref pe, 2
objsend id, 0x00B1, ps, pe, 1
return
#global
sdim buf, 128
buf = "These pages are \"Hot Soup Processor Beginner's Club\"."
objsize winx / 3, 25 : objmode 2
pos winx / 3 * 0, 0 : combox caret, , "選択開始位置\n選択終了位置"
pos winx / 3 * 1, 0 : button "先頭へ移動する", *move
pos winx / 3 * 2, 0 : button "末端へ移動する", *move
pos winx / 3 * 0, 25 : mesbox buf, winx, winy - 25
stop
*move
btnid = stat
getcaretpos p, 3
strlen len, buf
p.caret = len * (btnid = 2)
setcaretpos 3, p, p.1
objsel 3
stop
|