Script for active hotpost users - send periodically

I have a hotspot without using user manager. Everyone who logs in , is using the user=“user” and pass=“”. So what i want to do is to know every 24 hrs how many users logged in, in total and send this number with an email every 24 hrs. I know this can be done with a script but unfortunately i m not that good with the scripting language of MTK , so i really need your help and wisdom.

If you need any information about the hotpost i would gradly provide them.

http://forum.mikrotik.com/t/is-there-a-way-to-count-hotspot-users/57461/31

Thank you c0der but this is not quite what i am asking for. I know its almost the same but it lacks the email function which is quite important to me.

You need something like this, you just have to change your email accounts

/system script
add name=active policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source="#get time date and active users\r\
    \n:local date [/system clock get date];\r\
    \n:local time [/system clock get time];\r\
    \n:local active [/ip hotspot active print count-only];\r\
    \n\r\
    \n:log info \"\";\r\
    \n:log info \"\$active active users at \$time - \$date\";\r\
    \n\r\
    \n/tool e-mail send to=\"user@gmail.com\" subject=\"Active Users\" body=\"\$active active users at \$time - \$date\"  server=[:resolve smtp.gma\
    il.com] tls=yes;\r\
    \n:log info \"Sending active users to user@gmail.com\";\r\
    \n\r\
    \n:log info \"\";"



/system scheduler
add disabled=no interval=1d name=active on-event=active policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-date=jan/28/2013 \
    start-time=23:59:00



/tool e-mail
set address=0.0.0.0 from=username@gmail.com password=pass port=25 starttls=no user=username

i want link for telegram or whatssapp it possibal ?