The file which contains the active proxy name (and all other settings) is foxyproxy.xml. The location of that file is dictated by what you've selected in FoxyProxy's options dialog (Global Settings tab->Settings Storage Location). By default, it's the Firefox profile directory.
The root XML node of that file is <foxyproxy/>. The attribute named mode
contains the value of which proxy is active. Its value can be disabled, patterns, or the ID of one of the <proxy/> nodes in the file (this means that proxy is used for all requests regardless of patterns).
So you'll want to write a program that:
1. Closes firefox
2. Edits this file
3. Starts firefox
Good luck! Perhaps you can share with us what you write... I can post it to http://foxyproxy.mozdev.org
if you like
p.s. where can I download this "ConfigFree" to try?