Adam,
use the whole code, including the 'function' keyword that defines the new
function. A full example macro would look like this :
// example macro with the custom makeArrow function
run("Clown (14K)");
makeArrow(70, 23, 52, 109);
function makeArrow(x,y,x1,y1) {
eval('script','img = IJ.getImage();a= new
Arrow('+x+','+y+','+x1+','+y1+');img.setRoi(a);');
}
// end of macro
On Wed, Mar 24, 2010 at 9:38 AM, Adam Cliffe <
[hidden email]>wrote:
> Hi Jerome,
>
> Thanks for the mail, I've tried the function and I just get this
> message:
> ReferenceError: "newArrow" is not defined. (<Unknown source>#1) in
> <Unknown source> at line number 1
>
> any idea what's going wrong?
>
> thanks
>
> Adam
>
>
> On Mar 24, 2010, at 4:12 PM, Jerome Mutterer wrote:
>
> function makeArrow(x,y,x1,y1) {
>> eval('script','img = IJ.getImage();a= new
>> Arrow('+x+','+y+','+x1+','+y1+');img.setRoi(a);');
>> }
>>
>
> Dr Adam Cliffe
> Research Scientist, Rorth Lab
>
> Institute of Molecular and Cell Biology
> 61 Biopolis Drive
> Proteos
> Singapore 138673
>
> tel: +65 6586 9731
>
>
>
>
>
>
>
>
>
> Note: This message may contain confidential information. If this Email/Fax
> has been sent to you by mistake, please notify the sender and delete it
> immediately. Thank you.
>