Sg2.9
Pyton Scripts
Recent RSS
Pyton Scripts
From:  mojo bean
Date:  29. January 2014, 01:21

i want to run some python scripts
on scriptographer like this code
# target illustrator
import math
ai.noFill()
rot1 = 0
rot2 = rot1 + ((math.pi/200)*95)
rot3 = rot1 + ((math.pi/200)*105)
num1 = 0.23
num2 = 0.055
step = 0

for i in range(0,501):
ai.strokeWidth(0.1)
ai.strokeColor(0,0.7,1,0)
step = step + math.pi/415
rot1 = rot1 + (math.pi/130)*(math.cos(step))
rot2 = rot1 + ((math.pi/130)*(95+(i*0.02)))
rot3 = rot1 + ((math.pi/130)*(105-(i*0.02)))
x1 = math.cos(rot1)*(50-(i*num1))
y1 = math.sin(rot1)*(50-(i*num1))
x2 = math.cos(rot1)*(50-(i*num1))*-1
y2 = math.sin(rot1)*(50-(i*num1))*-1
x3 = math.cos(rot2)*(30-(i*num2))
y3 = math.sin(rot2)*(30-(i*num2))
x4 = math.cos(rot3)*(30-(i*num2))
y4 = math.sin(rot3)*(30-(i*num2))
ai.curve(x1,y1,x3*10,y3*10,\
x4*10,y4*10,x2,y2)
ai.curve(-x1,-y1,-x3*10,-y3*10,\

  • x4*10,-y4*10,-x2,-y2)
  • -----------------------------------------------------------------

i made it .py script but when trying to execute it console say Unable to find script engine for this script

  • --------------------------------------

when i opened Scriptographer \ Core \ JavaScript \ gui \ main.js
i found (/ \ (:.?. JS | rb | PY) $ / test (file.name)
my question how to excute python scripts in scriptographer

  • -----------------------------------------------------

My windows 7 64
java 7 64-32
python 64
illustrator cs5
hope to get help
thanks in advance

Re: Pyton Scripts
From:  alta
Date:  5. February 2014, 10:21

SG is based on Javascript, not Python...

Re: Pyton Scripts
From:  untitled
Date:  5. February 2014, 18:49

True it's based upon Javascript, but Javascript has the same - Math: cos,sin,pi, etc.

So there is nothing there that would prevent it from being converted to Javascript.

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
Mosaic Staple Raster 24.03.10