'*********************************************************************************** '*** *** '*** Product Desc. : Program for reading barcode and sending to com *** '*** Product Name : CineScan *** '*** File Name : Cineplus.src *** '*** *** '*** Edition History *** '*** Version Date Comments *** '*** ------- -------- ---------------------------------------------- *** '*** 1.00.00 15/10/09 Original *** '*** 2.01.00 23/10/09 Final Release *** '*** 3.01.00 01/09/10 Anpassung an BHT-300 *** '*** 3.02.00 02/09/10 Funktion "blättern" hinzugefügt *** '*** 3.03.00 06/09/10 Funktion "löschen" hinzugefügt *** '*** 3.04.00 08/09/10 alle Stückzahlen editierbar, Bugs beseitigt *** '*** 3.05.00 10/09/10 Scanmode einstellbar über Setup *** '*** 3.06.00 21/07/11 Error Behandlung Löschen hinzugefügt *** '*** 4.00.00 09/02/12 Anpassung an BHT-800 *** '*** 4.01.00 09/02/12 Fehler in der Eingabe der Stückzahl beseitigt *** '*** 4.02.00 13/02/12 Scan von Code 39 zusätzlich ermöglicht (Werk) *** '*** 4.03.00 14/02/12 Bugfix b. löschen v. letztem Scan (Pointer) *** '*** *** '*** Copyright (C) 2012 - C+ Mediaservice, M.Eicher *** '*** All rights reserved. *** '*********************************************************************************** '+=================================================================================+ '| Some Definitions... | '==================================================================================+ COUNTRY$ = "G" 'Deutscher Zeichensatz const BarFile = 1 'der Barcode Leser const DatFile = 2 'die Datei const ComFile = 3 'der Com Port out &h6080, 24 'Schriftgröße 24 Point private bartype$ 'der verwendete 1. Barcode Typ private bartype1$ 'der verwendete 2. Barcode Typ private readmode$ 'Scanner Lesemodus private blankline$ 'Zeile löschen mit Leerzeichen private ibar$ 'gelesener Barcode private bentry$ 'Eingabe B. Nummer private set1$ 'Setup 1 Eingabe private set2$ 'Setup 2 Eingabe private kin$ 'Eingabe Stückzahl private keysearch$ 'Tastenauswertung Proc4 private keysearch2$ 'Tastenauswertung Proc2 private keysearch3$ 'Tastenauswertung Proc3 private keysearch5$ 'Tastenauswertung Proc5 private lastrec% 'letzter Datensatz private bcdata$ 'Barcode Daten private tempkey$ 'Menu Auswahl private ver$ 'Programmversion private ScId$ 'Scanner ID private anzahl% 'Anzahl Datensätze private datfname$ 'Dateiname private updown% 'Zähler zum blättern private flag1% 'Flag zum rückwärts bättern private flag2% 'Flag zum vorvärts blättern private point% 'Pointer zum aktellen Datensatz private lock% 'Sperre für zu weites Zurückgehen bartype$ = "I:6-10C" 'Interleaved 2of5, 6-10 Zeichen bartype1$ = "M:8-10" 'Code 39, 8-10 Zeichen, kein Check readmode$ = "F" 'Auto Off blankline$ = " " '20 leere Zeichen (1 Zeile) datfname$ = "Scandata.dat" 'Dateiname definieren ScId$ = "10" 'default Scanner ID definieren ver$ = "4.3" 'Version Nummer key 30,"m" 'Ist der M1 Key key 31,"n" 'Ist der M2 Key key 5, "E" 'Ist der up Key key 6, "F" 'Ist der down Key key 7, "G" 'Ist der left Key key 8, "H" 'Ist der right Key '==================================================================================+ '| Anzahl bereits vorhandener Datensätze nach Neustart anzeigen | '==================================================================================+ open datfname$ as #DatFile 'Datei öffnen field #DatFile, 2 as tempid$, 4 as tempdat1$, 10 as tempdat2$, 6 as tempdat3$, 5 as tempdat4$ anzahl% = lof(#DatFile) 'Anzahl Datensätze ermitteln close #DatFile '+=================================================================================+ '| Main menu | '+=================================================================================+ main: on error goto 0 'Fehlerbehandlung zurück setzen while 1 beep 3,1,1,1 cls screen 1,1 print " CineScan" screen 0,1 locate 1,1 : print ScId$ locate 1,2 : print " " + readmode$; " " locate 15,1 : print " V" + ver$ locate 15,2 : print " " locate 18,2 : print using "###"; anzahl% screen 0,0 locate 5,5 print "1: Scannen" locate 5,6 print "2: Tastatur" locate 5,7 print "3: Senden" locate 5,8 print "4: Setup" locate 5,9 print "5: Beenden" wait 0,&h01 tempkey$ = inkey$ beep 1,1,1,1 select tempkey$ case "1": screen 0 cls gosub proc1: case "2": screen 0 cls gosub proc2: case "3": screen 0 cls gosub proc3: case "4": screen 0 cls gosub proc4: case "5": screen 0 cls gosub proc5: end select wend '+=================================================================================+ '| Functions: Read, Store, Transmit | '+=================================================================================+ '+---------------------------------------------------------------------------------+ '| Function: Wait for reading bar code | '| f.no% file number of bar code device file | '| bar$ read code 1 | '| bar1$ read code 2 | '| keylist$ list of key to end function | '| rmode $ Readmode (F=AutoOFF/A=Alternate) | '| bar code data | '| | '| Description: | '| When a bar code is read, returns the bar code data. | '| When specified key is pressed, returns the key data (from list). | '+---------------------------------------------------------------------------------+ function inpbar$(f.no%, bar$, bar1$, keylist$, rmode$) private wk$ 'Rohdaten open "BAR:" + rmode$ as #f.no% code bar$, bar1$ 'Barcode lesen - 2 codes while 1 wait 0,&h03 if loc(#f.no%) then beep input #f.no%,wk$ 'Barcode vom Leser in wk$ if len (wk$) = 10 then '2of5 Barcode inpbar$ = MID$(wk$,2,8) 'führende 0 und Parity entfernen else inpbar$ = wk$ 'Code 39 direkt verarbeiten endif close #f.no% exit function else wk$ = inkey$ if instr(1,keylist$,wk$) > 0 then 'Sondertasten gedrückt? inpbar$ = wk$ close #f.no% exit function endif endif wend end function '+---------------------------------------------------------------------------------+ '| Function: Write data to file | '| f.no% file number of data file | '| data$ write data | '| None | '| | '| Description: | '| Write specified data to the data file. Add Date , Time & ID to Record | '+---------------------------------------------------------------------------------+ sub putfile%(f.no%, data$) private fdata$ private kdata$ private datum$ 'Systemdatum private zeit$ 'Systemzeit private dd$ private mn$ private yy$ private hh$ private mm$ private dstempel$ 'Datumsstempel private zstempel$ 'Zeistempel kdata$ = "1" 'Stückzahl ohne Eingabe immer 1 datum$ = date$ zeit$ = time$ dd$ = right$(datum$, 2) mn$ = mid$(datum$, 4, 2) yy$ = left$(datum$, 2) hh$ = left$(zeit$, 2) mm$ = mid$(zeit$, 4, 2) dstempel$ = dd$ + mn$ + yy$ 'Datum String zstempel$ = hh$ + ":" + mm$ 'Zeit String open datfname$ as #f.no% field #f.no%, 2 as ScId$, 4 as kdata$, 10 as fdata$, 6 as dstempel$, 5 as zstempel$ fdata$ = data$ put #f.no% 'Datensatz speichern close #f.no% end sub '+---------------------------------------------------------------------------------+ '| Function: Send the data file to host computer COM Port | '| f.no% file number of communications device file | '| para$ communications parameter | '| flname$ file name | '| returns the number of sent barcodes if it is successful | '| | '| Description: | '| Send the data file. | '+---------------------------------------------------------------------------------+ function sendfile%(f.no%, para$, flname$) const LF = chr$ (&h0A) const CR = chr$ (&h0D) private record% 'Anzahl der Datensätze private frdata$ 'Die Barcodes private readdata$ 'Der Ausgabe String private x% 'Zähler zur Verarbeitung private num% 'die Nummer in der Ausgabe num% = 0 'zurücksetzen der Anzahl open flname$ as #DatFile 'Datei öffnen open para$ as #f.no% 'COM mit Parametern öffnen field #DatFile, 2 as ScId$, 4 as kdata$, 10 as frdata$, 6 as dstempel$, 5 as zstempel$ record% = lof(#DatFile) 'Anzahl Datensätze ermitteln for X%=1 to record% 'Schleife durch alle Scans get #DatFile,X% if frdata$ <> "XXXXXXXX" then 'gelöschten String nicht verarbeiten num% = num% + 1 'Nummer erzeugen readdata$ = readdata$ + "/" + str$(num%) + "\" +ScId$ + "\" + kdata$ + "\" + frdata$ + "\" + dstempel$ + "\" + zstempel$ print #f.no%, readdata$ 'Daten auf COM Port ausgeben readdata$ = "" 'String löschen endif next x% close #f.no% close #DatFile sendfile% = num% 'Alles OK, Anzahl zurück geben end function '+=================================================================================+ '| reading and editing the Barcodes | Process 1 | '+=================================================================================+ proc1: updown% = 0 'der UP/DOWN Zähler flag1% = 0 'es wurde noch nicht zurück geblättert flag2% = 0 'es wurde noch nicht vor geblättert lock% = 0 '1. Datensatz noch nicht erreicht while 1 screen ,1 locate 1,1 : print blankline$ locate 1,2 : print blankline$ locate 5,1 : print "Bar Code Scan"; locate 18,2 : print using "###"; anzahl% screen ,0 locate 6,7 : print "BL[TTERN "; CHR$(&h04) locate 1,8 : print "<- Tasten dr]cken ->" locate 2,10 : print "F7: Scan L\SCHEN"; locate 2,11 : print "M1: Hauptmenu "; locate 2,12 : print "M2: Anzahl "; ibar$ = inpbar$(BarFile, bartype$, bartype1$, "m,n,E,F,G", readmode$) 'wait for reading bar code 'or special key is pressed if len(ibar$) > 1 then 'es wurde ein Barcode gelesen screen ,1 locate 1,4 : print blankline$ screen ,3 locate 1,5 : print ">" + ibar$ + "<" screen ,1 locate 1,6 : print blankline$ screen ,0 putfile%(Datfile,ibar$) anzahl% = anzahl% +1 updown% = 0 'Zähler zum Blättern zurück setzten flag1% = 0 'Blätter Flag 1 zurücksetzen für neue Stückzahl! flag2% = 0 'Blatter Flag 2 Zurücksetzen open datfname$ as #DatFile 'Datei öffnen - Anzahl Datensätze ermitteln field #DatFile, 2 as ScId$, 4 as kdata$, 10 as bcdata$, 6 as dstempel$, 5 as zstempel$ lastrec% = lof(#DatFile) 'Anzahl Datensätze ermitteln point% = lastrec% 'Pointer auf letzen Datensatz setzen close #DatFile else 'es wurde eine Taste betätigt select ibar$ case "m" 'when the M1 key is pressed cls return case "n" 'when the M2 key is pressed Stückz. Eingabe if flag1% = 0 AND flag2% = 0 then 'es wurde noch nicht geblättert screen ,1 locate 1,3 : print blankline$ screen ,3 locate 1,4 : print blankline$ locate 2,4 : input "Anz."; kin$ screen ,1 locate 1,5 : print blankline$ on error goto err01: 'Fehler Routine open datfname$ as #DatFile 'Datei öffnen field #DatFile, 2 as ScId$, 4 as kdata$, 10 as bcdata$, 6 as dstempel$, 5 as zstempel$ lastrec% = lof(#DatFile) 'Anzahl Datensätze ermitteln get #DatFile, lastrec% 'letzte BC Nummer lesen kdata$ = kin$ 'Stückzahl ändern put #DatFile, lastrec% 'Daten schreiben close #DatFile cls endif if flag1% = 1 or flag2% = 1 then 'geblättert, Pointer existent und - screen ,1 'Stückzahl im Blättermodus locate 1,3 : print blankline$ screen ,3 locate 1,4 : print blankline$ locate 2,4 : input "Anz."; kin$ screen ,1 locate 1,5 : print blankline$ on error goto err01: 'Fehler Routine open datfname$ as #DatFile 'Datei öffnen field #DatFile, 2 as ScId$, 4 as kdata$, 10 as bcdata$, 6 as dstempel$, 5 as zstempel$ get #DatFile, point% 'aktuelle BC Nummer über Pointer lesen kdata$ = kin$ 'Stückzahl ändern put #DatFile, point% 'Daten an Pointer Stelle schreiben close #DatFile locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,5 : print blankline$ locate 2,4 print using "& &"; bcdata$; 'geänderte Daten Anzeigen print using "& &"; kdata$; print "Nr."; point% print blankline$ endif case "E" 'Richtung Anfang blättern if anzahl% > 1 then 'erst ab 2 Scans blättern if lock% <> 1 then 'falls keine Sperre gegen - beep 1,1,1,0 'zurückblättern gesetzt locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,5 : print blankline$ screen ,1 locate 1,6 : print blankline$ screen ,0 locate 2,4 if flag2% = 1 then updown% = updown% + 1 endif on error goto err01: 'Fehler Routine open datfname$ as #DatFile 'Datei öffnen field #DatFile, 2 as ScId$, 4 as kdata$, 10 as bcdata$, 6 as dstempel$, 5 as zstempel$ lastrec% = lof(#DatFile) 'Anzahl Datensätze ermitteln get #DatFile, lastrec% - updown% 'letzte BC Nummer ermitteln print using "& &"; bcdata$; print using "& &"; kdata$; print "Nr."; lastrec% - updown% print blankline$ point% = lastrec% - updown% 'Pointer zum löschen updown% = updown% + 1 'Zähler für Position if lastrec% - updown% = 0 then 'keine Null Pointer! lock% = 1 'Flag für Sperre gegen - endif 'weiteres zurückblättern close #DatFile flag1% = 1 flag2% = 0 endif endif case "F" 'Richtung Ende blättern if updown% => 1 then 'am Ende nicht weiter blättern beep 1,1,1,0 locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,5 : print blankline$ screen ,1 locate 1,6 : print blankline$ screen ,0 locate 2,4 if flag1% = 1 then updown% = updown% - 1 endif updown% = updown% - 1 on error goto err01: 'Fehler Routine open datfname$ as #DatFile 'Datei öffnen field #DatFile, 2 as ScId$, 4 as kdata$, 10 as bcdata$, 6 as dstempel$, 5 as zstempel$ lastrec% = lof(#DatFile) 'Anz. Datensätze ermitteln if lastrec% - updown% <= lastrec% then 'keine Zähler größer Anzahl der Datensätze get #DatFile, lastrec% - updown% 'letzte BC Nummer ermitteln print using "& &"; bcdata$; print using "& &"; kdata$; print "Nr."; lastrec% - updown% point% = lastrec% - updown% 'Pointer zum Löschen if updown% = 0 then print " letzter Datensatz" endif endif close #DatFile flag1% = 0 flag2% = 1 lock% = 0 endif case "G" 'Taste links gedrückt - beep 1,1,1,0 'Datensatz löschen! if anzahl% > 1 then 'erst ab 2 Scans löschen if updown% => 0 then loop3 locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,5 : print blankline$ screen ,1 locate 1,6 : print blankline$ screen ,0 locate 1,3 print "Datens."; point% ; " l\schen?" locate 2,5 : input "0=Nein / 9=Ja"; jn$ if jn$ = "0" then beep 1,1,1,0 locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,5 : print blankline$ else : if jn$ = "9" then on error goto err01: 'Fehler Routine beep 1,1,1,0 locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,5 : print blankline$ open datfname$ as #DatFile 'Datei öffnen field #DatFile, 2 as ScId$, 4 as kdata$, 10 as bcdata$, 6 as dstempel$, 5 as zstempel$ get #DatFile, point% 'aktuelle BC Nummer lesen kdata$ = "X" 'Stückzahl löschen bcdata$ ="XXXXXXXX" 'Barc. löschen (Stopcode eins.) dstempel$ = "" 'Datum löschen zstempel$ = "" 'Zeit löschen put #DatFile, point% 'Daten schreiben close #DatFile locate 1,4 : print "Datens."; point%; " gel\scht!" else : goto loop3 endif endif endif endif end select endif wend '+=================================================================================+ '| Manual Entry | Process 2 | '+=================================================================================+ proc2: updown% = 0 'der UP/DOWN Zähler flag1% = 0 'es wurde noch nicht zurück geblättert flag2% = 0 'es wurde noch nicht vor geblättert lock% = 0 '1. Datensatz noch nicht erreicht screen ,1 locate 1,1 : print blankline$ locate 1,2 : print blankline$ locate 3,1 : print "Manuelle Eingabe"; locate 18,2 : print using "###"; anzahl% screen ,0 locate 2,11 : print "M1: Hauptmenu "; locate 2,12 : print "M2: Neue Eingabe"; locate 2,5 : input "Nr.:", bentry$ 'Nummer eingeben ibar$ = left$(bentry$, 8) 'nur 8 Zeichen Länge max. putfile%(Datfile,ibar$) on error goto err01: 'Fehler Routine locate 2,6 : input "Anz."; kin$ 'Anzahl eingeben open datfname$ as #DatFile 'Datei öffnen field #DatFile, 2 as ScId$, 4 as kdata$, 10 as bcdata$, 6 as dstempel$, 5 as zstempel$ lastrec% = lof(#DatFile) 'Anzahl Datensätze ermitteln get #DatFile, lastrec% 'letzte BC Nummer speichern kdata$ = kin$ 'Stückzahl ändern put #DatFile, lastrec% 'Daten schreiben close #DatFile locate 1,3 : print blankline$ locate 1,4 : print blankline$ anzahl% = anzahl% +1 screen ,1 locate 18,2 : print using "###"; anzahl% screen ,0 locate 1,5 : print blankline$ locate 1,6 : print blankline$ locate 2,7 : print "N[CHST. Eing.="; anzahl% + 1 while 1 keysearch2$ = inkey$ select keysearch2$ case "m" 'when the M1 key is pressed cls return case "n" 'when the M2 key is pressed cls goto proc2: case "E" 'Richtung Anfang blättern if anzahl% > 1 then 'erst ab 2 Scans blättern if lock% <> 1 then 'falls k. Sperre gegen Zurückbl. gesetzt beep 1,1,1,0 locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,5 : print blankline$ locate 2,4 if flag2% = 1 then updown% = updown% + 1 endif on error goto err01: 'Fehler Routine open datfname$ as #DatFile 'Datei öffnen field #DatFile, 2 as ScId$, 4 as kdata$, 10 as bcdata$, 6 as dstempel$, 5 as zstempel$ lastrec% = lof(#DatFile) 'Anzahl Datensätze ermitteln get #DatFile, lastrec% - updown% 'letzte BC Nummer ermitteln print using "& &"; bcdata$; print using "& &"; kdata$; print "Nr."; lastrec% - updown% print blankline$ point% = lastrec% - updown% 'Pointer zum löschen updown% = updown% + 1 'Zähler für Position if lastrec% - updown% = 0 then 'keine Null Pointer! lock% = 1 'Flag f. Sperre gg. weiteres Zurückbl. endif close #DatFile flag1% = 1 flag2% = 0 endif endif case "F" 'Richtung Ende blättern if updown% => 1 then 'am Ende nicht weiter blättern beep 1,1,1,0 locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,5 : print blankline$ locate 2,4 if flag1% = 1 then updown% = updown% - 1 endif updown% = updown% - 1 on error goto err01: 'Fehler Routine open datfname$ as #DatFile 'Datei öffnen field #DatFile, 2 as ScId$, 4 as kdata$, 10 as bcdata$, 6 as dstempel$, 5 as zstempel$ lastrec% = lof(#DatFile) 'Anzahl Datensätze ermitteln if lastrec% - updown% <= lastrec% then 'keine Zähler > Anz. d. Datens. get #DatFile, lastrec% - updown% 'letzte BC Nummer ermitteln print using "& &"; bcdata$; print using "& &"; kdata$; print "Nr."; lastrec% - updown% point% = lastrec% - updown% 'Pointer zum Löschen if updown% = 0 then print " letzter Datensatz" endif endif close #DatFile flag1% = 0 flag2% = 1 lock% = 0 endif case "G" 'Taste links gedrückt beep 1,1,1,0 if anzahl% > 1 then 'erst ab 2 Scans löschen if updown% => 0 then loop4 locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,5 : print blankline$ locate 2,3 print "Datensatz"; point% ; " l\schen?" locate 2,5 : input "0=Nein / 9=Ja"; jn$ if jn$ = "0" then beep 1,1,1,0 locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,5 : print blankline$ else : if jn$ = "9" then on error goto err01: 'Fehler Routine beep 1,1,1,0 locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,5 : print blankline$ open datfname$ as #DatFile 'Datei öffnen field #DatFile, 2 as ScId$, 4 as kdata$, 10 as bcdata$, 6 as dstempel$, 5 as zstempel$ get #DatFile, point% 'aktuelle BC Nummer lesen kdata$ = "X" 'Stückzahl löschen bcdata$ ="XXXXXXXX" 'barcode löschem (Stopcode einsetzen) dstempel$ = "" 'Datum löschen zstempel$ = "" 'Zeit löschen put #DatFile, point% 'Daten schreiben close #DatFile locate 1,4 : print "Datens."; point%; " gel\scht!" else : goto loop4 endif endif endif endif end select wend '+=================================================================================+ '| Transmit File | Process 3 | '+=================================================================================+ proc3: private ret% cls screen ,1 locate 1,1 : print blankline$ locate 1,2 : print blankline$ locate 8,1: print "Senden"; ret% = sendfile%(ComFile, "com:9600,n,8,1", datfname$) 'Function, returns sent files 'Datenfile senden if ret% => 0 then locate 18,2 : print using "###"; anzahl% screen ,0 locate 2,5 : print str$(ret%) + " Barcodes ges."; locate 1,6 : print blankline$ locate 3,7 : print "Daten l\schen?" beep 1,1,1,0 locate 2,11 : print "M1: Nein "; locate 2,12 : print "M2: Ja "; while 2 keysearch3$ = inkey$ select keysearch3$ case "m" 'when the M1 key is pressed cls beep 1,1,1,0 return case "n" 'when the M2 key is pressed on error goto err01: 'Fehler Routine kill datfname$ 'Datenfile löschen anzahl% = 0 'Zähler zurücksetzen beep 1,1,1,0 return end select wend endif return '+=================================================================================+ '| Setup | Process 4 | '+=================================================================================+ proc4: private ans$ 'Eingabe für Löschen JA/NEIN screen ,1 locate 1,1 : print blankline$ locate 1,2 : print blankline$ locate 8,1 : print "Setup"; locate 18,2 : print using "###"; anzahl% screen ,0 locate 2,4 : print "ScannerID: " + ScId$ locate 2,5 : print "Modus : " + readmode$ locate 2,10 : print "F7: [ndern "; locate 2,11 : print "M1: Hauptmenu "; locate 2,12 : print "M2: Daten L\schen"; while 1 keysearch$ = inkey$ select keysearch$ case "G" 'Ändern locate 1,4 : print blankline$ locate 1,5 : print blankline$ locate 2,4 : input "ScannerID."; set1$ 'Id eingeben ScId$ = left$(set1$, 2) beep 1,1,1,0 loop1 locate 2,5 : input "Modus 1/2 "; set2$ 'Modus eingeben beep 1,1,1,0 select set2$ case "1" readmode$ = "F" case "2" readmode$ = "A" case else goto loop1 end select locate 1,4 : print blankline$ locate 2,4 : print "ScannerID: " + ScId$ locate 1,5 : print blankline$ locate 2,5 : print "Modus : " + readmode$ beep 1,1,1,0 case "m" 'when the M1 key is pressed cls return case "n" 'when the M2 key is pressed locate 1,4 : print blankline$ locate 1,10 : print blankline$ locate 2,4 : print "Daten l\schen?"; locate 1,5 : print blankline$ locate 2,5 : input "0=Nein / 9=Ja"; ans$ 'Antwort Eingabe if ans$ = "9" then on error goto err01: 'Fehler Routine kill datfname$ 'Datenfile löschen anzahl% = 0 'Zähler zurücksetzen screen ,1 locate 18,2 : print using "###"; anzahl% screen ,0 locate 1,3 : print blankline$ locate 1,4 : print blankline$ locate 1,4 : print "alle Daten gel\scht!" locate 1,5 : print blankline$ beep 1,1,1,0 else locate 1,4 : print blankline$ locate 1,5 : print blankline$ beep 1,1,1,0 goto proc4: end if end select wend '+=================================================================================+ '| Info | Process 5 | '+=================================================================================+ proc5: screen ,1 locate 1,1 : print blankline$ locate 1,2 : print blankline$ locate 7,1: print "Shutdown"; screen ,0 locate 1,3 : print " C+ Mediaservice" locate 1,4 : print " GmbH & Co. KG " locate 1,5 : print " (c) Michael Eicher" locate 1,6 : print " 02/2012 " locate 1,7 : print blankline$ locate 1,8 : print " CINEPLUS.PD3 V" + ver$ locate 2,11 : print "M1: Hauptmenu "; locate 2,12 : print "M2: Power Off "; while 1 keysearch5$ = inkey$ select keysearch5$ case "m" 'when the M1 key is pressed cls return case "n" 'when the M2 key is pressed cls power 0 end select wend '+================================================================================+ '| Fehler Behandlung | errr01 | '+================================================================================+ err01: cls locate 1,4 : print "Fehler! "; 'Abfangen des Fehlers locate 1,5 : print blankline$ timea = 20 'Timer zur Anzeige der Fehlermeldung locate 1,6 : print "Aktion nicht m\glich" loop2 while timea > 0 'Timer läuft goto loop2 wend close #DatFile 'Dantenfile schließen resume main 'Navigation zum Hauptmenu