i want to comparison bytes value (tx-bytes,rx-bytes) downloaded by user with my pattern for example (100MiB, 50MiB) but i can't write script for solve this , how can i do that ?
the place i want write script for that is : /interface wireless registration-table > tx-rx bytes value (an image of this Place)
As you state, you can query registration table using /interface wireless registration-table. Putting this on a scripting loop gives
then, in this foreach loop, get each client's statistics using the id (example here with "mac-address" and "bytes" fields)
The "bytes" data returned is in format "RX,TX" (i.e "545124,25422"). So you have to do a little trick to extract the RX string: look for the "," character and extract string before this comma.
Then, it's easy to check if that client has downloaded more than 50M
Put all together in a script and execute it, you will get something like
For the complete Mikrotik scripting manual, check http://wiki.mikrotik.com/wiki/Manual:Scripting