µ¤¤¬¸þ¤¤¤¿¤Î¤Ç´°À®·¿¤òºî¤Ã¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¡£
ºÇ½é¤Î¤ä¤Ä¤Ï¥Ð¥¤¥Ê¥ê¤ÇÊݸ¤·¤Æ¤¤¤Þ¤·¤¿¤¬¡¢¥Æ¥¥¹¥È¤Ç¥í¥°¥Õ¥¡¥¤¥ë¤ò
ºîÀ®¤·¤Ê¤¬¤é½èÍý¤¹¤ë¤è¤¦¤ËÊѹ¹¤·¤Æ¤¤¤Þ¤¹¡£
csv¤Ç½ÐÎϤ·¤Þ¤¹¤Î¤Ç¡¢Excel¤Ê¤É¤Ç¤â½èÍý¤·¤ä¤¹¤¤¤È»×¤¤¤Þ¤¹¡£
½é¿´¼Ô¤È¤Î¤³¤È¤Ç¤¹¤Î¤Ç¡¢¤³¤ì¤Ç²ò·è¤È¤»¤º£±¤Ä£±¤Ä¥ê¥Õ¥¡¥ì¥ó¥¹¤ò¸«¤Æ
²¿¤ò¤·¤Æ¤¤¤ë¤Î¤«³Ð¤¨¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£
#packopt name "keylog"
#packopt hide 1
title "¥¡¼¤Î¾õÂÖ¤òµÏ¿"
screen 0,480,480,0,ginfo_dispx/2-240,ginfo_dispy/2-260
t=3600 // ½é´üÃÍ¡Ê1»þ´Ö=3600¡Ë
color 0,0,0: boxf // ¹õ¤ÇÁ´ÂΤò¥¯¥ê¥¢
color 0,255,255 // ʸ»ú¿§
pos 32,32: mes "¼Â¹Ô¤¹¤ëÉÿô¤òÆþÎϤ·¤Æ¥¹¥¿¡¼¥È¥Ü¥¿¥ó¤ò²¡¤·¤Æ¤¯¤À¤µ¤¤¡£"
pos 192,80: input t,100,20,5
objsize 160,40
pos 160,128: button goto "¥¹¥¿¡¼¥È",*main
stop
*main
clrobj // ¥ª¥Ö¥¸¥§¥¯¥È¤ò¥¯¥ê¥¢
t=t*10 // Éâª0.1ÉÃñ°Ì¤Ë¤¹¤ë
i=0 // ¥«¥¦¥ó¥¿½é´ü²½
log="»þ´Ö(0.1ÉÃ),A,B,C\n" // ʸ»úÎ󷿤ˤ·¤Æ¤ª¤¯¡Ê¥í¥°ÍÑ¡Ë
notesel log // ¥á¥â¥ê¥Î¡¼¥È¥Ñ¥Ã¥É¤ÎÂоݤˤ·¤Æ¤ª¤¯
// ¥ë¡¼¥×½èÍý
repeat t
i++ // ¥«¥¦¥ó¥¿
// ¥¡¼¤Î¾õÂÖ¤ò¼èÆÀ
getkey a,65 // A
getkey b,66 // B
getkey c,67 // C
// ·ë²Ì¤ò¥Æ¥¥¹¥È¤ÇÄɵ¤·¤Æ¤¤¤¯
log+=strf("%06d",i)+","+str(a)+","+str(b)+","+str(c)+"\n"
redraw 0 // ²¾ÁÛ²èÌ̤ËÉÁ²è³«»Ï
color 0,0,0: boxf // ¹õ¤ÇÁ´ÂΤò¥¯¥ê¥¢
color 255,255,255: pos 112,16 // ʸ»ú¤Î¿§¤ÈÉÁ²è³«»Ï°ÌÃÖ
mes "A:"+a+" B:"+b+" C:"+c+"\n·Ð²á»þ´Ö: "+i/10+" Éà ("+i+" / "+t+")"
// ¥í¥°¥×¥ì¥Ó¥å¡¼
color 0,255,255: mes "----------------------------------"
if i>22 { j=22 } else { j=i }
repeat j
noteget stmp1,cnt+i-j+1 // 1¹ÔÆɤ߽Ф·
split stmp1,",",stmp2 // ɽ¼¨ÍѤËʬ³ä¤¹¤ë
mes stmp2(0)+"\tA:"+stmp2(1)+" B:"+stmp2(2)+" C:"+stmp2(3) // ɽ¼¨
loop
redraw 1 // ²èÌ̤ËÈ¿±Ç
await 100 // 0.1ÉÃÂÔ¤Ä
loop
// »þ´Öʬ¥ë¡¼¥×¤¹¤ë¤È¤³¤³¤«¤é²¼¤¬¼Â¹Ô¤µ¤ì¤ë
// ¥À¥¤¥¢¥í¥°¤ò½Ð¤·¤Æ¥í¥°¤òÊݸ¤¹¤ë¤«Ì䤦
dialog "½èÍý¤¬´°Î»¤·¤Þ¤·¤¿¡£\n¥í¥°¤ò¥Õ¥¡¥¤¥ë¤ËÊݸ¤·¤Þ¤¹¤«¡©",2,"´°Î»"
if stat=7 { goto *exit } // [¤¤¤¤¤¨]¤Ê¤é½ªÎ»
*save
// Êݸ¥À¥¤¥¢¥í¥°
dialog "csv",17,"csv¥Õ¥¡¥¤¥ë"
// ¥¥ã¥ó¥»¥ë¤Ê¤é²¿¤â¤»¤º½ªÎ»
if stat=0 { goto *exit }
// Êݸ¥Õ¥¡¥¤¥ë¤Î¥Õ¥ë¥Ñ¥¹
stmp1=refstr
strrep stmp1,".csv","" // Æó½Å³ÈÄ¥»Ò¤Ë¤Ê¤é¤Ê¤¤¤è¤¦°ìö³ÈÄ¥»Ò¤ò½üµî
stmp1=stmp1+".csv" // ³ÈÄ¥»ÒÄɲÃ
// ¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹¤ë¤«³Îǧ
exist stmp1
if strsize!-1 {
dialog stmp1+"\nƱ̾¤Î¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Þ¤¹¡£¾å½ñ¤¤·¤Æ¤è¤í¤·¤¤¤Ç¤¹¤«¡©",2,"¾å½ñ¤¤Î³Îǧ"
if stat=7 { goto *save } // [¤¤¤¤¤¨]¤Ê¤éÊݸ¥À¥¤¥¢¥í¥°¤ËÌá¤ë
}
// ¥Õ¥¡¥¤¥ë¤ËÊݸ¤·¤Æ½ªÎ»
notesave stmp1
dialog stmp1+"\n¾åµ¤ËÊݸ¤·¤Þ¤·¤¿¡£¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò½ªÎ»¤·¤Þ¤¹¡£",0,"Êݸ´°Î»"
*exit
end