Hi Qiang,
First of all, the things you mention here can be done in regular Origin as well - OriginPro is not needed.
You can detect selection using script or Origin C. The code pasted below shows how to get selection on worksheet using an Origin C funciton.
As for FFT, look up documentation on the LabTalk FFT object. This object can be programmed in LabTalk script to perform FFT, or it can be programmed directly in Origin C using statements such as:
LabTalk.FFT.Data$="data1_a"
Also, the NAG library offers FFT routines that can be directly called from Origin C functions.
Hope this information helps you. If you need more extensive help on prgramming etc. it may be best for you to get in touch with your local tech support office.
Easwar
OriginLab.
void test()
{
Worksheet wks = Project.ActiveLayer();
if(wks)
{
int c1, c2, r1, r2;
int seltype = wks.GetSelection(c1, c2, r1, r2);
if(WKS_SEL_NONE == seltype)
{
printf("Nothing was selected in the worksheet!\n");
return;
}
printf("Columns/Rows of selection: c1 = %d\tc2 = %d\tr1 = %d\tr2 = %d\n", c1, c2, r1, r2);
}
else
printf("Active page is not a worksheet!\n");
}