Once you have the shortcut, you can simulate it in AHK. You could also make AHK script to click on the menu elements to open the console, or to press ALT key to highlight menu shortcuts and then press appropriate letters.
Once the console is open you can type the code there, also using AHK.
That's an idea but I find it not very convevient, I would like something more powerful like dll call or COM Oject or anything else that don't need to open the console, send text, active previous window,etc... thanks for reply
that would only work if blender has implemented COM support or some dll/cmd parameter stuff for other programs to use. for the years I've used blender, I don't think I've seen or heard of any such thing.
rawr. fear me.
*poke* Is it December 21, 2012 yet?
I don't know about Blender, but if it runs Python scripts, I suppose that you could create a COM server in Python and access it from AutoHotkey. For example, pythoncom.RegisterActiveObject + ComObjActive. (I suppose that you would need to create a class extending PyIUnknown, but that's just an educated guess. I don't use Python.)
Another option might be AutoHotkey.dll. I'm pretty sure there are examples on the forums for using it from Python.