Community discussions

MUM Europe 2020

Search found 6 matches

by RenzoG
Sat Jun 09, 2018 2:10 pm
Forum: Scripting
Topic: Variables in script calls. [SOLVED]
Replies: 5
Views: 819

Re: Variables in script calls. [SOLVED]

Grrrrrreat! It works. I needed to return multiple values, not only itaTime. So, in called script, I created: :global myDay do={ :return [:pick [/system clock get date] 4 6]; } :global myMonth do={ :return [:pick [/system clock get date] 0 3]; } :global myYear do={ :return [:pick [/system clock get d...
by RenzoG
Fri Jun 08, 2018 5:54 pm
Forum: Scripting
Topic: Variables in script calls. [SOLVED]
Replies: 5
Views: 819

Re: Variables in script calls. [SOLVED]

Well, I must be a nerd! I can't make it work. Please take a look at what I have done: Script Ita_Time (Called Script): :global itaTime do={ :local myDate value=[/system clock get date]; :local myTime value=[/system clock get time]; :local myDay [:pick $myDate 4 6]; :local myMonth [:pick $myDate 0 3]...
by RenzoG
Fri Jun 08, 2018 3:09 pm
Forum: Scripting
Topic: Variables in script calls. [SOLVED]
Replies: 5
Views: 819

Re: Variables in script calls. [SOLVED]

Many thanks Dasiu. I'm reading Wikipedia RouterOS Funcion. It's very interesting and I have to thank you a lot for your precious infos.
Many thanks again.
I'm going to try.
by RenzoG
Fri Jun 08, 2018 2:00 pm
Forum: Scripting
Topic: Variables in script calls. [SOLVED]
Replies: 5
Views: 819

Variables in script calls. [SOLVED]

Hi everybody. I'm trying to call script B from different scripts, in the same device of course. But variables declared in B are empty when used in calling scripts. Variables that I need are declared as follows (I tried to change "local" in "global", with same result): :local myDate value=[/system cl...
by RenzoG
Tue Jun 05, 2018 10:35 am
Forum: Wireless Networking
Topic: dhcp-server lease disable and enable numbers. [SOLVED]
Replies: 2
Views: 1402

Re: dhcp-server lease disable and enable numbers. [SOLVED]

van9019, many thanks for your reply. Yes, I determine manually MAC addresses I want to allow. Yes, ARP is already read only. Simply I was using "get" method for "numbers", and it couldn't work. Here the working code: :local newDynamics value=[/ip dhcp-server lease find dynamic=yes]; :local newList v...
by RenzoG
Mon Jun 04, 2018 11:15 pm
Forum: Wireless Networking
Topic: dhcp-server lease disable and enable numbers. [SOLVED]
Replies: 2
Views: 1402

dhcp-server lease disable and enable numbers. [SOLVED]

Hello, everybody. I'm trying to block unwanted dhcp client connections. I wouldn't use firewall because there are already a lot of rules. I'm trying this way but if I simply block an ip address it will have connectivity until server renews the lease. So I should disable and enable again the number t...