ある部分が実行されずに困っています。
#pack "hspext.dll"
#include "hspext.as"
#uselib "user32.dll"
#func global GetClassName "GetClassNameA" int,int,int
#func global WindowFromPoint "WindowFromPoint" int,int
sdim classname,256
sdim txt,20,7
sdim loadtxt,200000
waittime=0
*classgetset
screen 0,320,24,0 : gsel 0,2
title "記録対象をShift+左クリック"
mesbox classname,320,24,0,256
*classget
classname=""
WindowFromPoint ginfo_mx,ginfo_my
GetClassName stat,varptr(classname),256
objprm 0,classname
getkey click,1
getkey shift,16
if click=1 and shift=1 {
dialog "記録対象["+classname+"]でよろしいですか?",2,"a"
if stat=6 :goto *main
}
wait 10
goto *classget
*main
screen 0,360,100
title "BlockAction Tool-Assisted Superplay"
clrobj
pos 0,0
mesbox loadtxt,240,100,5
pos 240,0
objsize 60,50
button "保存",*save
pos 240,50
button "読込",*load
pos 300,0
button "対象変更",*classgetset
pos 300,50
button "再生",*play
stop
*play
notesel loadmax
noteget repeatframe,1
repeat int(repeatframe)
aplobj classname
aplact
noteget utility,frame+1
if waittime=0 {
repeat 7
if cnt=0 :sstr="press ctrl":keycode=17
if cnt=1 :sstr="press left":keycode=37
if cnt=2 :sstr="press up":keycode=38
if cnt=3 :sstr="press right":keycode=39
if cnt=4 :sstr="press down":keycode=40
if cnt=5 :sstr="press space":keycode=16
if cnt=6 :sstr="press tab":keycode=17
ifstat=instr(utility,0,sstr)
if ifstat!-1 :aplkeyd keycode:await 1
loop
repeat 7
if cnt=0 :sstr="letgo ctrl":keycode=17
if cnt=1 :sstr="letgo left":keycode=37
if cnt=2 :sstr="letgo up":keycode=38
if cnt=3 :sstr="letgo right":keycode=39
if cnt=4 :sstr="letgo down":keycode=40
if cnt=5 :sstr="letgo space":keycode=16
if cnt=6 :sstr="letgo tab":keycode=17
ifstat=instr(utility,0,sstr)
if ifstat!-1 :aplkeyu keycode:await 1
loop
ifstat=instr(utility,0,"wait")
if ifstat!-1 {
waittime=int(strmid(utility,ifstat,5))
frame=frame+1
}
} else {
waittime=waittime-1
}
await 10
loop
stop
*save
dialog "txt",17,"テキストファイル"
if stat=0 :stop
notesel loadtxt
notesave refstr
goto *main
*load
dialog "txt",16,"テキストファイル"
if stat=0 :stop
notesel loadtxt
noteload refstr
goto *main
ソース丸写しで見にくいかもですが問題の部分は
if waittime=0 {
repeat 7
if cnt=0 :sstr="press ctrl":keycode=17
if cnt=1 :sstr="press left":keycode=37
if cnt=2 :sstr="press up":keycode=38
if cnt=3 :sstr="press right":keycode=39
if cnt=4 :sstr="press down":keycode=40
if cnt=5 :sstr="press space":keycode=16
if cnt=6 :sstr="press tab":keycode=17
ifstat=instr(utility,0,sstr)
if ifstat!-1 :aplkeyd keycode:await 1
loop
repeat 7
if cnt=0 :sstr="letgo ctrl":keycode=17
if cnt=1 :sstr="letgo left":keycode=37
if cnt=2 :sstr="letgo up":keycode=38
if cnt=3 :sstr="letgo right":keycode=39
if cnt=4 :sstr="letgo down":keycode=40
if cnt=5 :sstr="letgo space":keycode=16
if cnt=6 :sstr="letgo tab":keycode=17
ifstat=instr(utility,0,sstr)
if ifstat!-1 :aplkeyu keycode:await 1
loop
ifstat=instr(utility,0,"wait")
if ifstat!-1 {
waittime=int(strmid(utility,ifstat,5))
frame=frame+1
}
だと思うのですが。。。ご教示お願いします