The anti-static foam is a conductor. It allows the "capacitance" of your body to affect the screen - for example if you use a "pen" for the screen instead of your finger.
If the foam is attached to a machine where will it get the "capacitance" to trigger the contact with the screen? Perhaps the foam will need to be connected to ground?
...R