************************************
1833+ Mühle
907+ Ball Labyrinth
1497+ Gem Digger
2478+ Rest
==========
6715
************************************
6715+
62,369
==========
69,084
************************************
9060+ Digital Awakening:Rush to Adventure
69,084
==========
78144 Total AppGameKit Code
************************************
Row Counter
rem
rem AGK Application 1.08B11
rem
// MR 24.04.2013.1
// Count Rows from .agc files
global rows
rows=0
do
//this will copy the file to the app media path!
file$=Chooserawfile("*.agc") // die Datei landet dann im Media Ordner bei C:\Users\User\Documents\AGK\CountRows\media\ ^^
if len(file$)=0 then exit
CountRows(file$)
deletefile(file$) // its a copy
loop
do
print("Rows "+str(rows))
if getpointerpressed()=1 then exit
sync()
loop
end
function CountRows(file$)
// Open the File and then read each line and look for a code line
if right(file$,4)=".agc"
fc=opentoread(file$)
do
if fileeof(fc) then exit
l$=readline(fc)
l$=trim(l$)
if len(l$)>0
rows=rows+1
endif
loop
closefile(fc)
else
print("skip file "+file$)
endif
endfunction
function trim(l$)
//Spaces weg
while left(l$,1)=" "
l$=mid(l$,2,len(l$)-1)
endwhile
//keine Kommentare
if left(l$,3)="rem"
l$=""
endif
if left(l$,3)="REM"
l$=""
endif
if left(l$,2)="//"
l$=""
endif
if left(l$,1)="`"
l$=""
endif
endfunction l$