Is there any way to control photoshop properties externally?
===

I am writing a small application to change the color of photoshop's brush. In photoshop, you have to go to the color picker and change the RGB value or pick a new color manually. I was wondering if there was a way to send a value to the variable/memory address that is holding that value.

I also wrote a application to change brush size from an external program, but it had to be done very crudely. The only solution I found was to send actual keystrokes of "[" and "]" which are hotkeys for brush size up and brush size down. Since there are no hotkeys to change the color, this method can't work. (I wrote this program in python but I am trying to find a c/c++ solution for the color problem)

Ideas would be great :)