I am doing a script who asks the user for a new Mikrotik Identity (At the end it will be an Auto-Setup script for our Network admins), but it doesn't store the value in the variable (Or this is what I think, you will know why later); so the Mikrotik Identity doesn't change. The Policy (Permissions) of scripts are all enabled (Must fix in final version). First created the Prompt script, it's content is the exact as the First one link I posted above. Then, created a second one, named Setup, copied and adapted the content of the examples of use. The script runs fine, but the Mikrotik Identity doesn't change. Saying that I typed an empty identity string, the [:put $mktiden] returns an empty string, but at System > Scripts > Environment I can see the name of the variable and it's value, the one I typed.
I'm wondering what's happening here; little help will be apreciated. I'm running RouterOS 5.19 on a RB450G. The code:
:global Prompt; :local runFunc; /system script run Prompt
$runFunc; :put "You entered: $mktiden"; /system identity set name=$mktiden;
_________________ Katsuro Kurosaki If you ask for a banana, would you expect someone to hand you an orange? Or a fork? No you wouldn't, because you asked for a banana, and you expect them to understand that a banana is not an orange or a fork. It's the same principle.
Users browsing this forum: No registered users and 14 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum