If a person initiates an inevitable sequence of events – such as when pulling a trigger, which frees a spring that then hits a firing pin, lighting gunpowder in a bullet – any consequences of the act are attributed to him, and under no circumstances can this be considered gramma (indirect action). Even if one shoots an arrow upwards which then falls because of the pull of gravity, the results of the action are attributed to him – since "the action in the end" can be clearly linked to the "original thought."
Many examples appear in halachic literature, some more serious than others (some are forbidden by Torah law, others by rabbinical decree, and there are differences between Shabbat and damage law). The conclusion of the rabbis is clear: as far as Shabbat is concerned, any action initiated by a human being without the intervention of any external element cannot be considered gramma, and it is therefore prohibited on Shabbat even if it is greatly needed.
This reasoning is very important with respect to electronic instruments. There is a significant difference between a delay mechanism and a gramma device. Many electric circuits make use of a built-in delay – when a button is pressed, the system starts to count down using one of various techniques. This is not gramma, and such systems cannot replace other mechanisms permitted for use on Shabbat.
A common example is the sensors that are installed in many elevator doors. When a person breaks a light beam, the light detector closes an electric circuit, which causes the elevator control to open the door. Opening the door in this way is not gramma! This action is attributed to the person who passed through the light beam. In a Shabbat elevator, it is necessary to disconnect these sensors (for Shabbat operation, the sensors are replaced by a warning buzzer).
Modern refrigerators (with electronic controls) sometimes have a door control. A sensor (usually a pin which is held in by the door, but sometimes a hidden magnetic detector) causes the control system to sound a buzzer if the door is left open for longer than a preset time. This action is also not gramma, and the mechanism must be turned off before Shabbat.