Community discussions

MikroTik App
 
xmanuw
just joined
Topic Author
Posts: 16
Joined: Mon Feb 02, 2009 6:54 pm

getting and setting of global variables via API?

Thu Jun 18, 2009 11:21 am

Is there any way to access or set global variables via API?

In the terminal I can do something like this:
:global test 1

:put $test
That works fine.

Is there any equivalent API command?

Thanks in advance.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7188
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: getting and setting of global variables via API?

Fri Jun 19, 2009 10:28 am

you can't do set global variables from API directly, however you can add script and execute script using API.
 
xmanuw
just joined
Topic Author
Posts: 16
Joined: Mon Feb 02, 2009 6:54 pm

Re: getting and setting of global variables via API?

Fri Jun 19, 2009 11:05 am

Then I can also create a script that does never run and then use =source= as variable.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: getting and setting of global variables via API?

Fri Jun 19, 2009 3:04 pm

you can't do set global variables from API directly
what about 'get'?

Who is online

Users browsing this forum: No registered users and 22 guests