The pedal inputs on the UX2 are for momentary switches only (like the keyboard sustain pedal used with a synthesizer or digital piano). They're used to step up and down through presets or to control start/stop and other MIDI Machine Control functions (MMC) audio recording application Transport Controls.
Other parameters can be controlled within the software, but to do that you need an external MIDI source (like a programmable MIDI foot controller plugged into your computer's MIDI interface).
GearBox Wah Control
In GearBox under Edit/Preferences/Midi tab select your midi interface ports IN and OUT. Set your midi controller pedal to CC# (continues controller number) to CC# 4. This should engage the wah function in GearBox.