Script to Disable Physical Interface in Mikrotik Router

Dear Team,
I don’t know how to do Scripting in Mikrotik Router. In My Router I having 2 WAN Interface, The Bandwidth goes on Both WAN Interface. When the WAN_1 is Not Working sum Packets are going on WAN_2 but sum are dropped. After I Manually Disable the WAN_1 all the Packets are going on WAN_2. I need a Script the Disable the Physical Interface when the Router Can’t Reach the Interface Gateway. Team Please help me on this Scripting.

Regards
Kiranraj R

And if WAN 1 comes back how would you check, if it is disabled? Search for another way. This is not it.

Hi Friend,
I Can Login in to router Via WAN_2 and Check it or I Can Check Via LAN or I can Physically check the Link Directly in PC. I Just Want to Disable the Physical Interface when the Gateway is Unreachable.