Step 1: Trigger
You can use “Scheduler” or “Netwatch” to trigger Scripts.
Step 2: Script A (IP-Online)
The quick and easy way is to use “comment” to find the correct NAT-Rules
After Creating the needed NAT-Rules simply add a unique string to you comments.
In the following exemple the comment must contain “abcdef” or “123456”
/ip firewall nat set [find where comment~"abcdef"] disabled=yes
/ip firewall nat set [find where comment~"123456"] disabled=no
Step 3: Script B (IP-Offline)
For Script B you just have to do the reverse
/ip firewall nat set [find where comment~"abcdef"] disabled=no
/ip firewall nat set [find where comment~"123456"] disabled=yes