If cursor is already at the beginning of the line, then go to the beginning of the first line of current input.Ĭontrol-E – move cursor to the end of line. If this is the last line of input then recall next input from history.Ĭontrol-A – move cursor to the beginning of the line. If this is the first line of input then recall previous input from history.Ĭontrol-N – go to next line. Display second of the two resulting lines.Ĭontrol-B – move cursor backwards one characterĬontrol-F – move cursor forward one characterĬontrol-P – go to previous line. When pressed second time, show possible completions.Ĭontrol-H – remove character before cursor and move cursor back one position.Ĭontrol-\ – split line at cursor. If the previous character is \, then inserts literal ?.
Mikrotik scripting full#
Full screen editor is not used in this mode.Ĭontrol-D – log out (if input line is empty)Ĭontrol-K – clear from cursor to the end of lineį1 or ? – show context sensitive help. In single line mode only one terminal line is used for line editing, and long lines are shown truncated around the cursor. It also uses full screen editor for editing large text values, such as scripts. In multiline mode line editor displays complete input line, even if it is longer than single terminal line.
Probably she could be a good tester someday.Console line editor works either in multiline mode or in single line mode. When I programmed the router, my daughter in a desperate attempt to stay up late even without the internet, found that I did a mistake and scheduled the enabling script at 7 minutes after the midnight instead of 7am and a couple of days more enjoyed the wi-fi in nights. Repeat the same to schedule the enabling script.Select required policies or check them all.Select the start date, start time (hh:mm:ss format) and the interval for repeating the action like 1d 00:00:00 (it means one day and no hours, minutes and secs).Type the name of your script into the On Event text area like DisableWLAN.Type some meaningful name for the scheduled task like DisableWLAN.Press Add button to open the Scheduler window.Next you can try to test the script with “Run Script” button.It could be found in the Interfaces section. Make sure you are using the proper name of the wireless interface.Type script into the source text area: interface wireless disable wlan1.Select policies required by the script or check all of them.Press Add button and the script editor window will open.The web UI turned out to be not so usable for script creation and scheduling.Īll required settings could be found on the screen shot at the left (click to see it).Īll the detailed steps are below. However it is also possible to do all the same things in the console. I found that the most convenient way for me is WinBox.
There are three ways how the scripts could be created and scheduled: good old console, web client and the WinBox app. Where wlan1is the name of my router wireless interface and disablecould be switched to enabled. The complete scripting language documentation could be found here.Īfter a bit of reading and playing around I found that I need just a couple of 1-line scripts as simple as interface wireless disable wlan1 But it is a chance to learn one more programming language. I found the router could easily help me achieve the goal using built-in script support and scheduler. An interesting thing about the router is that it uses own operating system called RouterOS, so scripting is not so easy as it could be on a Linux system. It has been serving me faithfully for several months, but I still discover something interesting in it from time to time. I am a happy owner of MikroTik RB951G-2HnD Wireless Router. Using social networks requires access to the internet, so I decided to program my router to switch-off wi-fi access for the night time.