New touchpads have a functionality built in that can enable/disable them. Some that I've used even have a light on/off to show the lock status they have atm.
Just hold your finger in the left upper corner of your touchupad to see if you have it.
If using Synaptics - their drivers offer configure-ability on the matter.
If both the first post and mine don't help you you might want to look into making a simple script via command line to detect if your mouse is connected and to enable/disable the device.
P.S. If you don't have a driver - get one. If its a branded laptop better get it off the brand's website, not the manufacturer one.