One of the most robust ideas to come out of cognitive psychology in recent years is priming. Scientists have shown again and again that they can very subtly cue people’s unconscious minds to think and act certain ways. These cues might be concepts—like cold or fast or elderly—or they might be goals like professional success; either way, these signals shape our behavior, often without any awareness that we are being manipulated.

This is humbling, especially when you think about what it means for our everyday beliefs and actions. The priming experiments take place in laboratories, using deliberately contrived signals, but in fact our world is full of cues that act on our minds all the time, for better or for worse. Indeed, many of our actions are reactions to random stimuli outside our consciousness, meaning that the lives we lead are much more automated than we like to acknowledge.

But how automated? Are we really helpless in the face of these ubiquitous cues? Or do we have some power to recognize and trump these forces? Is there a way to protect ourselves—our goals and intentions—from the world’s random signaling, especially those intrusive influences that would undermine our life and values?

New York University psychological scientist Peter Gollwitzer believes that we do have such power, and he set out to demonstrate it in a series of experiments. He explored a particular self-regulatory tool, which he calls if-then plans. If-then plans involve anticipating particular situations, and spelling out for ourselves in advance how we will act if a particular contingency arises. It may be that embracing broad goals is not enough to trump harmful influences in the world, but if we spell our intentions out in detail—the when, where and how of an intended course of action—this might defuse the power of potentially harmful cues.

Here’s how he tested this idea in the lab. He had a group of volunteers read a fictitious scientific article that emphasized the similarity between humans and other animals. Some read a version that referred to fast animals like cheetahs and hares, while others read about slugs and tortoises. In other words, some were primed for speed and others for sluggishness, and they were afterward timed on a word classification task.

Up to this point, this is a typical priming experiment, and one would expect these volunteers to act either slowly or quickly in the word task. But in this experiment, they also got this instruction: “And if the nonword ‘avenda’ appears, then I respond especially quickly.” This was the if-then plan: It wasn’t simply the general intention of responding quickly and accurately; it was a focused plan targeting a specific cue. The idea was that having such a mental plan would counter the priming effect, and that’s precisely what happened. Volunteers responded much faster to “avenda” than to any other stimulus, regardless of whether they were primed for slowness or speed. In other words, cues did prime later actions—except when those actions were regulated by an if-then plan, in which case priming lost its potency.

So perhaps we’re not powerless, and maybe precise if-then plans are an effective self-regulatory tool. Gollwitzer wanted to bolster this conclusion in other ways, so for a second experiment he recruited volunteers to work on tedious arithmetic problems—a task that required a great deal of concentration. They all wrote down the sentence, “I will try to find as many correct solutions as possible.” So they all had the same general goal and intention. Then half of the volunteers also wrote this more specific if-then plan: “If I get distracted, then I will concentrate on the test even more.” The if-then plan differed from the general goal by focusing specifically on the contingency that they might get distracted in some way.

Then, before starting the task, some of the volunteers were primed with biographical information about Mother Teresa, others with a bio of Margaret Thatcher. The idea was that the saint of Calcutta would prime altruistic thoughts, while UK’s former prime minister would not.

Then they started the concentration task, but Gollwitzer had arranged for a confederate to interrupt the task. The confederate pretended to be another volunteer who was confused and lost and required help. The idea was to see how long the volunteers allowed themselves to be distracted from their work, and to see if those with an if-then plan were better focused.

The results were unambiguous. Those who were primed for altruism were indeed more distracted from their work—if they had formed only a general intention. But not if they had specified an if-then plan: In that case, those who anticipated being distracted, and made a plan to deal with it, experienced less disruption, regardless of whether they had Mother Teresa or Margaret Thatcher in mind. Again, a specified contingency plan defused the cognitive priming.

Gollwitzer ran a final experiment in which priming the idea of speed led to faster driving and more driving errors—but again, only for those with a general goal of safe driving. By contrast, those who had a detailed plan—“If I enter a curve, then I will slow down, and if I enter a straight road I will accelerate!”—were immune to the perilous speed cues. He reports the results of all three studies in the on-line version of the journal Psychological Science.

Obviously we cannot anticipate and plan for every random signal that the universe might send our way. Our lives will always be shaped in hidden and unwanted ways. But it’s not difficult to imagine areas of our lives —school, work, athletics—where it’s possible to anticipate hindrances and plan for them. For those important arenas, it’s encouraging to know that detailed planning can be an effective tool, and that we don’t have to be buffeted by forces out of our control.

Wray Herbert’s book, On Second Thought, explores the automatic forces that shape our lives. Excerpts from his two blogs—“We’re Only Human” and “Full Frontal Psychology”—appear regularly in Scientific American Mind and in The Huffington Post.