What do you mean by “call up comps”? Expressions can’t modify anything except the value of the property to which they are applied.
If you actually need to create something (comps, text layers, etc) or read files (text, csv, etc.) you need a script (like the one in your refernce), not an expression. If you use a script, the changes only occur when you run the script, not in real time.
I’m not sure I’ve helped, but I’m still not real clear on what you’re trying to do.
Dan