Player move with command

Currently on my page, I have:

  • a circle with the instance name “player”
  • a square with the instance name “box”
  • an input textbox with the instance name “command”
  • two rectangles forming a wall, each with the instance name “wall”

What I want to do is make the player move to the box when the words “go to box” are typed into the command textbox. I also need the player to walk along the shortest route, while also avoiding any obstacles (basically just the wall).

Could someone help me out?