画像ビュアーでも作りたいのかな?とスーパー拡大解釈してみました。
#include "hspext.as"
title "HSP Test Picture Viewer | ←→キーで操作"
p = 0
sdim folpath,260
selfolder folpath,""
if stat = 1 : end
chdir folpath
sdim dlist
dirlist dlist,"*.jpg",1
sdim dlist2
dirlist dlist2,"*.bmp",1
sdim dlist3
dirlist dlist3,"*.gif",1
dlist+=""+dlist2+""+dlist3
notesel dlist
if notemax = 0 : dialog "画像がない" : end
onkey gosub *key
gosub *showpic
stop
*key
if wparam = 37{
p--
if p<0 : p = notemax-1
gosub *showpic
}else:if wparam = 39{
p++
if p>notemax-1 : p = 0
gosub *showpic
}
return
*showpic
noteget fname,p
exist fname
if strsize!=-1{
picload fname,0
}
return