Community discussions

MikroTik App

Search found 21 matches

by anassar26
Tue Jun 04, 2024 10:26 pm
Forum: Scripting
Topic: Please help to modify script to rest counters for specified hotspot user
Replies: 1
Views: 868

Please help to modify script to rest counters for specified hotspot user

Can you help me with the error in the following script, as it a rest the counters for all users and not the users specified in the script # Define the list of specific users :local userList {"user1"; "user2"; "user3"} # Iterate over all hotspot users :foreach user in=[/...
by anassar26
Sat Jan 06, 2024 12:15 am
Forum: Scripting
Topic: Script DHCP Lease to Simple Queues don't work since update to 7.13
Replies: 7
Views: 4767

Script DHCP Lease to Simple Queues don't work since update to 7.13

Hi, i have used a DDNS script on mikrotik roouter OS9.6 for years but since the update to 7.13 the script don't work. I hope someone can point out whats wrong or what changed in 7.13 # DHCP Lease to Simple Queues # 2014 Lonnie Mendez (lmendez@anvilcom.com) # # Mikrotik RouterOS v6.9 /ip dhcp-server ...
by anassar26
Sun Dec 31, 2023 10:48 am
Forum: Scripting
Topic: Script - DHCP Lease to Simple Queues
Replies: 14
Views: 43039

Re: Script - DHCP Lease to Simple Queues

Please help to modifying script "DHCP Lease to Simple Queues" to work on Mikrotik RouterOS v7.13
Note that the script worked well on the previous version Mikrotik RouterOS v6.9
by anassar26
Fri May 20, 2022 7:05 pm
Forum: Scripting
Topic: Please help.. to solve invalid value " an integer required " error [SOLVED]
Replies: 13
Views: 2235

Re: Please help.. to solve invalid value " an integer required " error [SOLVED]

I need to modify the last script in the form below to make it work correctly. I added some additions to meet my requirements, but I encountered some difficulties when trying the script, such as it cannot be changed.”uptime “ I also want to change my script variable to download limit Thank you very m...
by anassar26
Fri May 20, 2022 4:30 pm
Forum: Scripting
Topic: Please help.. to solve invalid value " an integer required " error [SOLVED]
Replies: 13
Views: 2235

Re: Please help.. to solve invalid value " an integer required " error [SOLVED]

It is possible to modify the script to get the following values ​​for each user
Suppose we need to get the following values
100G....100 gaigbytes
30D.... 30 dayes
512M... profile 512M
from email structure " 100G@30D.512M "
by anassar26
Fri May 20, 2022 4:18 pm
Forum: Scripting
Topic: Please help.. to solve invalid value " an integer required " error [SOLVED]
Replies: 13
Views: 2235

Re: Please help.. to solve invalid value " an integer required " error [SOLVED]

Amazing.. the script is working fine. Thank you very much
by anassar26
Fri May 20, 2022 4:07 pm
Forum: Scripting
Topic: Please help.. to solve invalid value " an integer required " error [SOLVED]
Replies: 13
Views: 2235

Re: Please help.. to solve invalid value " an integer required " error [SOLVED]

Thank you .. but give the same result "invalid value for limit-bytes-total, an integer required"
email format "100GB@30.512M"
by anassar26
Fri May 20, 2022 3:59 pm
Forum: Scripting
Topic: Please help.. to solve invalid value " an integer required " error [SOLVED]
Replies: 13
Views: 2235

Re: Please help.. to solve invalid value " an integer required " error [SOLVED]

what is this?
$downquota print
Sorry, miss typing it has been modified
by anassar26
Fri May 20, 2022 3:52 pm
Forum: Scripting
Topic: Please help.. to solve invalid value " an integer required " error [SOLVED]
Replies: 13
Views: 2235

Please help.. to solve invalid value " an integer required " error [SOLVED]

Please help when applying the following script it gives an error “invalid value for limit-bytes-total, an integer required” and I can’t find the problem or fix it Script : :foreach i in=[/ip hotspot user find ] do={ :local email [/ip hotspot user get value-name=email $i ] :local downquotamb [:tonum ...
by anassar26
Sun May 08, 2022 12:51 am
Forum: Scripting
Topic: help me please .. how to limit users according to amount of download
Replies: 3
Views: 1376

help me please .. how to limit users according to amount of download

how can i limit users according to amount of download by using simple queue script ? i have 4 users some of them download a lot and I want to limit them after they reach 4 gigabyte per day I did simple queue for each one of them to limit upload and download rate speed I want limit users according to...
by anassar26
Wed Oct 13, 2021 9:21 am
Forum: Scripting
Topic: help to solve issue in script " dns to address lists scripts " [SOLVED]
Replies: 11
Views: 8398

Re: help to solve issue in script " dns to address lists scripts " [SOLVED]

You can optimize it a bit if you leave out the check and logging and then I can compress the write to one line: :foreach i in=[/ip dns cache find name~"(facebook|youtube)" ] do={ :do {/ip firewall address-list add address=[/ip dns cache get $i data] list=restricted comment=[/ip dns cache ...
by anassar26
Wed Sep 02, 2020 7:41 am
Forum: Scripting
Topic: help to solve issue in script " dns to address lists scripts " [SOLVED]
Replies: 11
Views: 8398

Re: help to solve issue in script " dns to address lists scripts " [SOLVED]

I assume it is working now?
Its working awesome
Thanks 👍😊
by anassar26
Sun Aug 30, 2020 9:51 pm
Forum: Scripting
Topic: help to solve issue in script " dns to address lists scripts " [SOLVED]
Replies: 11
Views: 8398

Re: help to solve issue in script " dns to address lists scripts " [SOLVED]

Try this: :foreach i in=[/ip dns cache find name~("facebook"|"youtube") type="A"] first many thanks i try script after your modification but i got no result in address list please help to get correct result "create list in address list for youtube and facebook&quo...
by anassar26
Sat Aug 29, 2020 5:35 am
Forum: Scripting
Topic: help to solve issue in script " dns to address lists scripts " [SOLVED]
Replies: 11
Views: 8398

help to solve issue in script " dns to address lists scripts " [SOLVED]

hi all i am using this script to collect YouTube & Facebook IP addresses in DNS cache ( for block or separate route ) but it is not working and get result "input does not match any value of value-name" please help me to solve issue i print dns cash to find Facebook and YouTube in cach ...
by anassar26
Thu Aug 13, 2020 12:05 am
Forum: Scripting
Topic: help get wrong result [SOLVED]
Replies: 6
Views: 2232

Re: help get wrong result [SOLVED]

:local downquotamb [:tonum [:pick $comment 0 3]]
:local downquota ($downquotamb * 1000)
Something like that. I can't test it on the moment but this what the manual stated.

I did not know that I had an other brother. ;-)
Many Thanks ... amazing
Script Working
thank you
by anassar26
Wed Aug 12, 2020 10:26 pm
Forum: Scripting
Topic: help get wrong result [SOLVED]
Replies: 6
Views: 2232

Re: help get wrong result [SOLVED]

:tonum and () instead of [] for arithmetic stuff. many thanks my brother i changed scrip to arithmetic stuff but get same result " 10 " please help me Script : :foreach i in=[/ip hotspot user find ] do={ :local comment [/ip hotspot user get value-name=comment $i ] :local downq [:tostr [:p...
by anassar26
Wed Aug 12, 2020 8:58 pm
Forum: Scripting
Topic: help get wrong result [SOLVED]
Replies: 6
Views: 2232

help get wrong result [SOLVED]

i use script below but get wrong result when run script assume data in comment = 10 equation = comment value * 1000 the result must be = 10 * 1000 = 10000 i get result =10 why?? please help me to solve this problem Script ; :foreach i in=[/ip hotspot user find ] do={ :local comment [/ip hotspot user...
by anassar26
Wed Aug 12, 2020 3:11 am
Forum: Scripting
Topic: Help to modify script
Replies: 0
Views: 746

Help to modify script

Please help to modify this script bleow to pik value of MB frome hotspot user comments and put value to downquotamb Orginal script : #Download limit in MB :local downquotamb "50" ### Do not modify anything below this line ### :local downquota [$downquotamb * 1000] :local counter :local dat...
by anassar26
Sun Aug 02, 2020 3:38 pm
Forum: Scripting
Topic: Plaese help! to modify script to work with dhcp leases ip only but I don't need to work with ppp or hotspot
Replies: 0
Views: 524

Plaese help! to modify script to work with dhcp leases ip only but I don't need to work with ppp or hotspot

I need help to modify script below to work with dhcp leases ip . Script : [{ :global time [/system clock get date] :global day [ :pick $time 4 6 ] /ppp secret; :foreach m in=[find]\ do={\ :global days value=[:tostr [/ppp secret get $m comment]]; :global max value=[:pick $days -1 [:find $days "d...