Originally posted by mograr
تابعنا مع الجديد
db = SQLite.Open("AutoPlay\\Docs\\coran.db");
s= SQLite.QueryToTable(db, "select * from coran");
Progress.SetRange("Progress1", 0, #s.Data);
x=0; y=0; g=0;
for i,v in pairs(s.Data) do
m = s.Data[i]["Aya_text"];
for wo in string.gmatch(m, "%S+") do
x=x+1;
if wo ~= " " then y = y + #wo ; end
end
g=i;
Progress.SetCurrentPos("Progress1", i);
end
Dial ="ÚÏÏ ÇáÇíÇÊ "..g .."\r\n".."ÚÏÏ ÇáßáãÇÊ "..x.."\r\n".."ÚÏÏ ÇáÍÑæÝ "..y ;
Input.SetText("Input1", Dial)
db = SQLite.Open("AutoPlay\\Docs\\coran.db"); s= SQLite.QueryToTable(db, "select * from coran"); let = {"Ã", "È", "Ê","Ë", "Ì" ,"Í","Î","Ï","Ð","Ñ","Ò","Ó"," Õ","Ö","Ø","Ù","Ú","Û","Ý","Þ","ß","á","ä","åÜ","æ","í"}; Progress.SetRange("Progress1", 0, #s.Data); res=""; for i,v in pairs(s.Data) do m = s.Data[i]["Aya_text"]; w=0; for p,lettre in pairs(let) do x=1; repeat find = String.Find(m, lettre, x); if find ~= -1 then w=w+1;end x=x+1; until find ==-1 res = res .."Nombre "..lettre .." is " ..w .."\r\n" end Progress.SetCurrentPos("Progress1", i); end Dialog.Message("",res);