Hi Anita,
It is because your PointProc macro is missing the 'dotool 0;' command.
Below is an alternative solution. I define another macro within the Pointproc macro, and in this way, avoid the need of the 'sec -p' to pause the code from running. The GetYesNo command will set the value of the 'done' variable to 1 if the user clicks Yes
dotool 4;
def pointproc {
mks1=; //output value of left marker
dotool 0;
getyesno (Add Range?) done;
if(done==1)
{
def newrange {
dotool 4;
def pointproc {
mks1=;
dotool 0;
getyesno (Add Range?) done;
if(done==1) newrange;
};
};
newrange;
}
};
The code could also look like this:
def newrange {
dotool 4;
def pointproc {
mks1=;
dotool 0;
getyesno (Add Range?) done;
if(done==1) newrange;
};
};
dotool 4;
def pointproc {
mks1=;
dotool 0;
getyesno (Add Range?) done;
if(done==1) newrange;
};
Newrange could also be a section of code in an OGS file instead of a macro. In the PointProc macro definition, you'd replace newrange; with run.section(myOGSfile.ogs,newrange);.
-Laurie
OriginLab Technical Support