while true
if chkimg(略) breake
見つかるまで繰り返す処理
skeep(1)
wend

超適当だけどこういうのじゃいかんの?