If you're referring to a DirectInput button(which is a legacy part of DirectX), button presses can only be generated by devices, which is a limitation of that API.
VoiceAttack can
control a virtual joystick device(using vJoy, a device driver that presents itself as a joystick but can be controlled from software), though this will be an additional device, not an existing one.