Logic Pro 9 wah pedal

I have already recorded a guitar part and want to use the wah pedal out of the pedal board insert. As my guitar part plays I am using the mouse to operate the wah pedal. How do I get logic to record the movements of the wah pedal?