However, to ensure that the OriginC finction is compiled when you activate the button, you will need to do a bit more than indicated by Larry above ....
The following is an example of a button script that I use to ensure compilation and execution of an OriginC function called "MassNormalizeMCVPDSC" which is located in an OriginC file called "MicroCalDSC.c"
%P=System.Path.Program$;
%Z=OriginC\System\rnahl\ImportSpecial\MicrocalDSC\MicroCalDSC.c;
if(run.loadOC(%P%Z)!=0)
{
ty -q Cannot Load Origin Support File MicroCalDSC.c;
ty -b;
}
else
{
ty -q Loading Origin Support File MicroCalDSC.c;
MassNormalizeMCVPDSC();
};