; ****************************************************************************** ; * New files scan v1.1 * ; ****************************************************************************** string toets,dateformat, default_dir, tekstregel string KeyPressed, Userinput, Userinput2, areas1, areas2, areas3, temp2, cijfer integer counter, X_pos, Y_pos date temp FOPEN 1,PPEPATH()+"FOODNEW.CNF",O_RD,S_DR FGET 1,default_dir FCLOSE 1 IF (!(tokcount()<>0)) goto NORMAL_START KeyPressed=tokenstr() tokenize KeyPressed gettoken Userinput gettoken Userinput2 gettoken Areas1 gettoken Areas2 gettoken Areas3 goto Skip_Input ; Wanneer 'N' alleen wordt ingeduwd! :NORMAL_START newline GOSUB HEADER dispfile PPEPATH()+"NEWMAIN.PCB",0 :INVRAGEN toets=UPPER(inkey()) if (toets=CHR(13)) goto CALL if (toets="S") goto CALL if (toets="D") goto DATE if (toets="T") goto TODAY if (toets="Y") goto YESTERDAY if (toets="W") goto WEEK if (toets="-") goto MIN if (toets="Q" | toets=chr(27)) goto QUIT if (toets="?") goto HELP goto invragen :HELP dispfile PPEPATH()+"NEWHELP.PCB",0 wait end :QUIT print "@X07QUIT!" end ; SCAN SINCE LAST CALL :CALL cls GOSUB HEADER newline if (upper(default_dir)="A") then println " Scanning for new files since ",U_LDATE(), " in all directories..." else println " Scanning for new files since ",U_LDATE(), " in the upload directory..." endif KBDSTUFF "N S "+default_dir end :DATE newline tekstregel=readline(PPEPATH()+"NEWDATE.PCB",1) print tekstregel+" " X_pos=getx() Y_pos=gety() print DATE() toets= "" :INPUT toets= inkey() If (upper(toets)="-") goto Decrease If (upper(toets)="+") goto Increase if (upper(toets)="Q") goto Quit if (toets=CHR(13)) goto Start_date_scanning goto input :Decrease DEC counter LET temp=DATE()+counter LET temp2 = todate(temp) Ansipos X_pos,Y_pos print temp2 goto INPUT :Increase INC counter LET temp=DATE()+counter LET temp2 = todate(temp) Ansipos X_pos,Y_pos print temp2 goto input :Start_date_scanning cls GOSUB HEADER newline if (upper(default_dir)="A") then println " Scanning for new files since ",temp2, " in all directories..." else println " Scanning for new files since ",temp2, " in the upload directory..." endif KBDSTUFF "N"+CHR(13) KBDSTUFF temp2+CHR(13) KBDSTUFF default_dir+CHR(13) END :TODAY cls GOSUB HEADER newline if (upper(default_dir)="A") then println " Scanning for new files since ",DATE(), " in all directories..." else println " Scanning for new files since ",DATE(), " in the upload directory..." endif KBDSTUFF "N"+CHR(13) KBDSTUFF string(DATE())+CHR(13) KBDSTUFF default_dir+CHR(13) end :YESTERDAY cls GOSUB HEADER newline if (upper(default_dir)="A") then println " Scanning for new files since ",todate(DATE()-1), " in all directories..." else println " Scanning for new files since ",todate(DATE()-1), " in the upload directory..." endif KBDSTUFF "N"+CHR(13) KBDSTUFF string(todate(DATE()-1))+CHR(13) KBDSTUFF default_dir+CHR(13) end :WEEK cls GOSUB HEADER newline if (upper(default_dir)="A") then println " Scanning for new files since ",todate(DATE()-7), " in all directories..." else println " Scanning for new files since ",todate(DATE()-7), " in the upload directory..." endif KBDSTUFF "N"+CHR(13) KBDSTUFF string(todate(DATE()-7))+CHR(13) KBDSTUFF default_dir+CHR(13) end :MIN print "@X07-" cijfer="" :INLEZEN toets=inkey() if (toets=chr(8)) goto BACKSPACE if (toets=chr(13)) goto ENTER if (toets="0" | toets="1" | toets="2" | toets="3" | toets="4") goto CIJFERS if (toets="5" | toets="6" | toets="7" | toets="8" | toets="9") goto CIJFERS goto INLEZEN :BACKSPACE if (len(cijfer)=0) then ansipos getx()-1,gety() print " " ansipos getx()-1,gety() goto INVRAGEN endif ansipos getx()-1,gety() print " " ansipos getx()-1,gety() CIJFER=LEFT(CIJFER,LEN(CIJFER)-1) goto INLEZEN :CIJFERS if (len(CIJFER)>=2) goto INLEZEN CIJFER=CIJFER+TOETS print TOETS goto INLEZEN end :ENTER cls GOSUB HEADER newline if (upper(default_dir)="A") then println " Scanning for new files since ",todate(DATE()-CIJFER), " in all directories..." else println " Scanning for new files since ",todate(DATE()-CIJFER), " in the upload directory..." endif KBDSTUFF "N"+CHR(13) KBDSTUFF string(todate(DATE()-CIJFER))+CHR(13) KBDSTUFF default_dir+CHR(13) end ;**************************************************************************** :SKIP_INPUT if (USERINPUT="?") then dispfile PPEPATH()+"NEWHELP.PCB",0 wait endif if (USERINPUT="S" && USERINPUT2="") goto CALL if ((USERINPUT="S" && USERINPUT2="A") || (USERINPUT="A" && USERINPUT2="S")) then default_dir="A" goto CALL endif if ((USERINPUT="S" && USERINPUT2="U") || (USERINPUT="U" && USERINPUT2="S")) then default_dir="U" goto CALL endif if (USERINPUT="T" && USERINPUT2="") goto TODAY if (USERINPUT="Y" && USERINPUT2="") goto YESTERDAY if ((USERINPUT="Y" && USERINPUT2="U") || (USERINPUT="U" && USERINPUT2="Y")) then default_dir="U" goto YESTERDAY endif if (USERINPUT="W" && USERINPUT2="") goto WEEK if (left(USERINPUT,1)="-" && USERINPUT2="") then LET temp=DATE()+USERINPUT ; datum min aantal dagen LET temp2 = todate(temp) goto Start_date_scanning endif if ((USERINPUT="U" && USERINPUT2="T") || (USERINPUT="T" && USERINPUT2="U")) then default_dir="U" goto TODAY endif end :HEADER println "@X01-----[ @X05New Files Scan v1.1 @X01]---[ @X05by MtL/fOOD @X01]----------[ @X05'N ?' for help @X01]-----@X07" RETURN