ほい。

repeat
NSExec("bclear")
NSExec('strsp 1,ボタン,20,20,10,1,16,16,0,12,1,1,#ffffff,#ffff00,#ff0000')
NSExec('bsp 1,"1,0","1,1","1,2"')
NSUpdate()
NSExec("bdown")
NSExec("bexec $0")
btnstr = NSGetStrValue(0)
if(btnstr == "S1") then
repeat
NSExec("bclear")
NSExec("bdown")
NSExec("btime 1")
NSExec("bexec $0")
btnstr = NSGetStrValue(0)
until(btnstr == "TIMEOUT")
end
until(end1 == true)