script to add static ip and mac address to DHCP server

In winbox, I have set of IP and mac address in IP---->Hotspot----------> IP bindings.

I want a script to add these IPs and MAC addresses to DHCP server.

:foreach ITEM in [/ip hotspot ip-binding find] do={
  :local MAC [/ip hotspot ip-binding get $ITEM mac-address;
  :local IP [/ip hotspot ip-binding get $ITEM address;
  /ip dhcp-server lease add address="$IP" mac-address="$MAC" disabled=no;
}

Untested, but it would be something like that.

it says:

syntax error (line 5 column 1)

fewi just forgot to close a couple brackets.

:foreach ITEM in=[/ip hotspot ip-binding find] do={
  :local MAC [/ip hotspot ip-binding get $ITEM mac-address];
  :local IP [/ip hotspot ip-binding get $ITEM address];
  /ip dhcp-server lease add address="$IP" mac-address="$MAC" disabled=no
}

thank you