Community discussions

MikroTik App
 
kblazk
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Sat Aug 21, 2004 12:19 am
Contact:

the dumbest script question ever

Fri Dec 21, 2007 8:30 pm

Where on earth do i put the scripts at that i find on here???, i have found 2 scripts and i don't have a clue where to put them, i put them in the System > script, that didn't work, then I tried the System > Scheduler, that didn't work, do i have to put half a script in the scheduler and the other half in the script box itself???, i have been allover the scripting how to page and it seems to assume i know something that i don't.

I would like to get a script that releases the dhcp when i change associations to a different AP but i have found two on here and none of them work, i think i am putting them in wrong????

closest thing i can get to what i want to accomplish is if i put /ip dhcp-client release wlan-station into the script box but i have to hit run script every time i want it to use it.
 
iam8up
Member
Member
Posts: 333
Joined: Sun Oct 28, 2007 10:58 pm
Location: Troy, OH
Contact:

Re: the dumbest script question ever

Sun Dec 23, 2007 4:28 am

Can you give us an example script? I'm not sure if you're referring to a set of configuration or an actual script with variables.
 
kblazk
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Sat Aug 21, 2004 12:19 am
Contact:

Re: the dumbest script question ever

Sun Dec 23, 2007 5:56 am

:if ( ([/int wireless monitor wlan-station as-value]->"status") != "connected-to-ess" ) do={ /ip dhcp-client release wlan-station }


the above script does not seem to do anything. I am running this on a mobile client with a connect list, I need the dhcp to release when it chooses another AP.
 
User avatar
GWISA
Member
Member
Posts: 389
Joined: Tue Jan 31, 2006 2:37 pm
Location: Johannesburg, South Africa

Re: the dumbest script question ever

Thu Dec 27, 2007 1:04 pm

Looks like you should paste it in the scheduler and run it periodically - set the interval to run every minute or something like that.

The difference between scripts and scheduler is that the scheduler can either run a pre-defined script, or run a script set in its own 'on event' pane.

To run a pre-defined script periodically, you must use scheduler, but scheduler can run a script without using one pre-defined in 'scripts'.

Make sense?

Who is online

Users browsing this forum: alexantao, hmdslm, marcelofares, tunguskalabs and 25 guests