Sg2.9
beginner: how to run a script...
Recent RSS
beginner: how to run a script properly?
From:  adam
Date:  7. October 2006, 13:58

hello, I'm sorry for this very stupid question but I'm loosing my mind. I am trying to get how this whole thing works. I found this tutorial (http://blog.stickupkid.com/script/2005/01/tutorial-two-circles.html) and I think I understand it. But I can't get the result.
I put the script into Scriptographer's scripts dir, but when I run it, I get just the console window. What do I have to do to get the result showed in the tutorial? I must be missing something. I checked installed scripts, but found nothing helpful. I would appreciate any related answer.

Re: beginner: how to run a script properly?
From:  Alex
Date:  7. October 2006, 15:27

Adam-

It looks like the code on that blog belonged to the previous version of Scriptographer. I think this is the code you're looking for:

function createCircle ()
{
var newSize = 50 * Math.random() ;
var x = 400 * Math.random() ;
var y = 400 * Math.random() ;
rect = new Rectangle(y, x, y + newSize, x + newSize);
activeDocument.createOval(rect);
}
createCircle();

Re: beginner: how to run a script properly?
From:  adam
Date:  7. October 2006, 16:49

Thank you Alex, now it works just great! Thanks a lot

Re: beginner: how to run a script properly?
From:  adam
Date:  7. October 2006, 19:08

well, it did not cross my mind it is possibly for the old version of SG. But update would be great :) as well as any following parts... I think not only me would be pleasured.

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Parallel Arrangement 07.04.12