|
画像スライドショー
LET PATH$="D:\My Pictures" !'画像フォルダを指定すること
LET PT$=PATH$ & "\*.*"
LET NN=FILES(PT$)
IF NN>0 THEN
DIM N$(NN),P$(NN),NAME$(NN),EXT$(NN)
FILE LIST PT$, N$
ELSE
STOP
END IF
FOR I=1 TO NN
FILE SPLITNAME(N$(I)) P$(I),NAME$(I),EXT$(I)
IF POS(".JPG.BMP.GIF",UCASE$(EXT$(I)))=0 THEN
LET NAME$(I)=""
LET P$(I)=""
LET EXT$(I)=""
ELSE
LET NUM=NUM+1
END IF
NEXT I
FOR I=1 TO NN
IF NAME$(I)<>"" THEN
WHEN EXCEPTION IN
CALL PICTURELOAD(PATH$ & "\" & NAME$(I) & EXT$(I),XSIZE,YSIZE)
LET K=K+1
PRINT K;"/";NUM;NAME$(I) & EXT$(I);XSIZE;"*";YSIZE
WAIT DELAY 3 !'表示時間(秒)
USE
PRINT "READ ERROR !! ";NAME$(I) & EXT$(I)
END WHEN
END IF
NEXT I
END
EXTERNAL SUB PICTURELOAD(N$,XSIZE,YSIZE)
SET COLOR MODE "NATIVE"
CLEAR
SET POINT STYLE 1
GLOAD N$
LET XSIZE=PIXELX(1)
LET YSIZE=PIXELY(1)
SET BITMAP SIZE XSIZE,YSIZE
SET WINDOW 0,XSIZE-1,YSIZE-1,0
END SUB
|
|