GL-AR150 Mode change between AP and router with a switch

It is possible. You can check how the script works by this post

You need to know how AP and Router mode works by setting the mode and check out the configurations.

It is really not easy actually.