Those buttons don't work with resistance (or at least don't depend on resistance). You just have to connect the two pads that make up the button together. How to do so depends on the circuit.
analogWrite(A1, 0);
Is indeed bs. A1 is not capable of PWM (= analogWrite). And if you use the function on a non-PWM pin it just act as digitalWrite(x, HIGH) for >=128 and LOW otherwise. Only thing is does do is setting the pinMode to OUPUT.
Blu-Vector,
Do you see how (in S4) the gold print is arranged like 2 combs pushed together? One comb is one contact, the other comb is another contact. The soft button is coated with a conductive film, and when pushed it connects the two combs. This IS a switch. This type of switch has a higher resistance than most switches, and can also handle only much lower currents. You can consider them ON or OFF, 0 ohms or infinite ohms, but whatever you are turning on/off cannot draw much current. (like less than 10 mA)
It is used just like any single pole single throw switch (i.e., common light switch). One contact is connected to ground OR power, the other is connected to the device to be turned on or off, the other side of the device goes to the opposite Power OR ground. In this case, the controlled device is an arduino pin, and that pin should be an input. (pinMode (INPUT) or, better yet, (pinMode(INPUT_PULLUP).
In the latter case of input pullup, you connect one side of the switch to ground, and the other side to your pin. The pin normally sits there in a high state, and when you push the button (or connect the 2 contacts) it drops to a low state. In other code, you then compare what state the switch is in, and do the action you desire for the state the switch is in.
In (DS2), there is a LED as well as a switch. (Probably intended to light up a translucent button.) You do not have to light the LED to make the switch work, the LED and the switch are separate components on the board. If you want to light the LED, be sure there is a current limiting resistor in the circuit. (There is not one shown in your picture, but there is likely to be one on that board. You must be sure.)
Is this a section of a remote control? Can you tell us more about it? Model? MFG.? Original use?
Fab, he is not trying to use the buttons as an input for the Arduino. He want's to control the function of the button with an Arduino. So the whole INPUT/pull up etc part of your story doesn't apply. But yes, it's just a button like every other button.
Wawa:
Remote control buttons like that are usually matrixed.
The easy way out is a small reed relay.
Indeed they are likely to be matrixed.
In which case the even easier and more compact way is to use a 74HC4066 for 4 buttons. If you figure out the matrix fully, it is possible to use a 74HC4051 to control up to eight buttons sharing each common line.