I fully agree with that!I was about to post what I thought was important, then realized boen_robot has written everything I was going to
So +1 to everything he said..
I have been thinking about polling SNR/CCQ of radio links and tuning BGP parameters using the results.SNMP-GET
I would like to poll external devices and have based on the results change routes, enable/disable interfaces.
It would be a nice feature.
[admin@MikroTik] > :put (192.168.88.10 & 255.255.0.0)
192.168.0.0
[admin@MikroTik] > :put (2003:cf:2f1e:5c00:d250:99ff:fec0:d180 & ffff:ffff:ffff:ff00::)
Script Error: cannot compute bitwise "and" of internal number and internal number
Missing from being implemented or missing in my command?bitwise operator works, whats missing is :toipv6
:put ([:toip6 2003:cf:2f1e:5c00:d250:99ff:fec0:d180 ] & [:toip6 ffff:ffff:ffff:ff00::])
mrz, can you give advise?Missing from being implemented or missing in my command?bitwise operator works, whats missing is :toipv6
... does not give an error, but does not give output neither.Code: Select all[admin@MikroTik] > :put ([:toip6 2003:cf:2f1e:5c00:d250:99ff:fec0:d180 ] & [:toip6 ffff:ffff:ffff:ff00::])
I mailed support and they told me "to be aware of the issue, perhaps it will be fixed in the upcoming versions" (see Ticket#2018061222006824).
:put [:typeof [:toip6 ffff::/64]]
nil
+1 to this, my implementation is limited and awfulurl_encode();
You may paste the script into Terminal after "{" - that will prevent it from running line by line. Then "}" and Enter to execute.I'd like to have a debug function that helped with basic syntax. When writing code I spend most of my time getting the basics in place. I write my logic then comment most of it out then uncomment line by line to make sure each line is working. With ros code, if it doesn't work, you get nothing to say where the error is
Looks like "+" works just fine:- Ability to add items to end of arrays
{
:local a {1;2;3};
:set a ($a + 5);
:foreach v in=$a do={
:put $v
};
}
Not sureAre they mentioned in the wiki?
I didn't get what's wrong with dates, sorryAny thoughts on the dates?
No, the documentation says using a comma is the correct way:Looks like "+" works just fine:- Ability to add items to end of arrays
:set a ($a, 5);
What scripting functions do you mean?..Secure DNS implementation would be welcome in the future
What is the progress on the original topic? Has it been decided if this is going to happen, when, and what functions?Completely unrelated to original topic.
What topic is unrelated?Completely unrelated to original topic.
({'.id': '*213', 'address': '192.168.10.57', 'mac-address': 'F5:DE:F1:24:DC:20', 'client-id': '1:f0:de:f1:23:dc:2a',})
Please stop the off-topic messages, and please delete them if they are yours.I'd love to see the terminal object-oriented.
After re-reading my post I have to fully agree. Edited.Please stop the off-topic messages, and please delete them if they are yours.I'd love to see the terminal object-oriented.
(I will delete this when that happens)
/put ("13:14:15" +1w2d23h59m59s)
1w3d13:14:14
/system scheduler add name=SiBTemp on-event={nothing } start-date=feb/31/2019;
put [/system scheduler get [find name=SiBTemp] start-date]
mar/03/2019
interface wireless spectral-history wlan1 duration=2s
:varname [:caps-man remote-cap get $i serial]
/env print
BF090FS8938={foo="bar"; foo; bar}
You could put this into an array...hi,
possibility to create variables named from object on the routeur like :
so i have a variable named BF090FS8938 (serial number of the router)Code: Select all:varname [:caps-man remote-cap get $i serial]
Code: Select all/env print BF090FS8938={foo="bar"; foo; bar}
[admin@mt] > :global RemoteCap [ :toarray "" ];
[admin@mt] > :set ($RemoteCap->[ /caps-man remote-cap get $i serial ]) {"foo"="bar"; "bar"="testing..."}
[admin@mt] > :put ($RemoteCap->[ /caps-man remote-cap get $i serial ]->"foo")
bar
[admin@mt] > :put ($RemoteCap->"BF090FS8938"->"bar")
testing...
{
global replaceCharacterFunc do={
while condition=[find $1 $2 0] do={
set $1 ("$[pick $1 0 ([find $1 $2]) ]".$3."$[pick $1 ([find $1 $2]+1) ([len $1])]")}
return $1
}
# Replace a character with an other character
put [$replaceCharacterFunc "Can-t-be-used-as-name-for-variable" "-" "*"]
# Remove unwanted character(s)
put [$replaceCharacterFunc "Can-t-be-used-as-name-for-variable" "-"]
}
while condition=[find $1 $2 0] do={
/interface wireless set [find default-name=wlan1] scan-and-connect = based-best-signal-ssid = [find=IspXSectorY];
/interface wireless set [find default-name=wlan1] set nv2-mixed-background-scan-from-all=enabled nv2-mixed-background-scan-time = 04: 00am
I prefer scsh.Just give us a bash
You can always start such a project or join an existing one, e.g. on github.To me the singularly most important addition would be opening this up to the community so that they could create and share functions safely and easily. So that you can leverage all the developers to contribute to a user extensible library.
THISNot sure if already suggested, but JSON support would be absolutely amazing!!!!!
See: JParseFunctions for a kinda hacky (but extremely useful) workaround that really needs to be implemented natively!
Just as said above, i think you have more chances with it on githubTo me the singularly most important addition would be opening this up to the community so that they could create and share functions safely and easily. So that you can leverage all the developers to contribute to a user extensible library.
I think the scripting language should be extended with a file open/read/write/close construct where you can open a file (a handle is returned), then read or write it in a loop either line-by-line or as fixed-size blocks (up to 4096 bytes), and then close it when finished. The total size of the file would be arbitrary (as long as it fits on the storage).A built-in function that broke up files and variables into 4096 byte chunks would be extremely useful.
:local result [/tool fetch url=$url as-value output=user]; :if ($result->"downloaded" < 64) do={ :local data ($result->"data")
You mean, in here? https://wiki.mikrotik.com/wiki/Manual:S ... ime_errorsCatch error messages
You mean, in here? https://wiki.mikrotik.com/wiki/Manual:S ... ime_errorsCatch error messages