How to define a preferred Mobile Network? Here is the situation: I live close to a border between to countries, one being under EU laws, the other being neutral, except when it comes to economical wars. 

I have a phone contract in the EU, but I get billed high prices when roaming in the other country. However, in most places where I use my phone, I have access to the EU network where I should not be billed extra at all.

I know how to select manually the Operator's Network GSM network I want from the settings (Select a Network Operator), and this is the degraded solution I normally use. Problem is this takes too much time when it detects a bunch of useless operators networks around.



So I would like to know if there is a way (app, probably), that would make this easy, like "try to use the Operator's Network I know is provided in his very location".

Making it a "quick setting" would be a must, but probably already addressed somewhere else here.



edit:

My phone is not "rooted", so I may not use Xposed features. Using a Macro looks cool, but it would be enough if there was a known shell command to do this. Then I just have to map the command to the macro. Maybe an answer to this?
TL;DR: you cannot do that, at least not without root.

Now the reason for this is due to security concerns there are not public APIs to actually do that software-wise. The closest you can get without root is using this software: https://play.google.com/store/apps/details?id=com.kmshack.autoset but it can toggle almost anything (after providing adb permissions) besides the network operator, again due to security reasons.

The preferred network list is defined by the operator (see Preferred Roaming List) so you cannot really influence it. You can however enable/disable network roaming in the menu or alternatively if you have root do it programmatically with xposed: http://repo.xposed.info/module/net.caze.roamingcontrol. You can also use the hidden android menu *#*#4636#*#* where you can control how your phone will determine which network type (not operator type) to prefer, still this is in regards to the networks in the preferred list set by the operator.

You still have the option to ask your operator to disable roaming for you, which might be a solution, however that would really require you to ask them to enable it again if you travel elsewhere ... 

And finally you can try the macro route via this: https://play.google.com/store/apps/details?id=com.joaomgcd.autoinput