Sg2.9
Help with javascript extensio...
Recent RSS
Help with javascript extensions in Scriptographer
From:  FLorian
Date:  30. May 2008, 15:26

Hey guys,

I´m trying to create an script for scriptographer, which is creating an world map with one circle per country. Every circle should be specified via a value which should be insert through an xml with the name of the country and the value which should be the factor for scaling the the circle´s.

The first question is:
Does something like an command for "read" exist?
Or do i have to use an Javascript extension? and does this work in scriptographer?
And another question is: do Javascript extension work in Scriptigrapher?

Thanks in advance

grettings from leipzig
florian

Re: Help with javascript extensions in Scriptographer
From:  FLorian
Date:  4. June 2008, 22:41

thanks....

Re: Help with javascript extensions in Scriptographer
From:  florian lamm
Date:  8. June 2008, 18:34

so now i got the basic script, and it´s working.
my only problem is, that i don´t know how to name the Circle which is drawn according to the Country´s name.....

and another problem is that the interface is popping up, but it doesn´t affect the values in the script.....

thanks in advance.
and greetings from leipzig

scriptName = "worldcontrol 0.1";

if(scriptographer.version)
{
version = parseFloat(scriptographer.version);
revision = parseFloat(scriptographer.revision);
if(version != 2)
{
print('this script is untested on your version of scriptographer.');
print('this script is designed for scriptographer version 2.0');
print('------');
print('');
print('');
}else{
print('[scriptographer version ok: '+version+'.'+revision + ']');
print(scriptName +' is trying to contol the world! ');
print('developed by Florian Lamm & Timo Hinze ');
print('');
print('');
}

}else{
var alertMessage = 'you are using an unknown version of scriptographer, nthis script will most likely not work for you.nuse scriptographer 2.0 [http://scriptographer.com]';
var dialog = new PopupDialog();
dialog.alert(alertMessage);
}
function onInit() {
PopupDialog()
}

var NamenIndex=0;
var flIndex=1
var medienIndex=2
var koordIndex=3;

var pfad="C:\Dokumente und Einstellungen\flo\Desktop\VORDIPLOM_Grafik\KALKULATION\Laender.csv";
var pixel2point=2; //skaliert alles
var xoff= 0;
var yoff= 0;
var km2pixel=0.1; // skaliert radius (relativ)
var maxFaktor=10; //farbspectrum, je höher dieser wert, desto geringer farbabstufung

var c1=new Array(255,255,0);
var c2=new Array(0,0,255);

var cm=new Array(0,0,0);
var dc=new Array(0,0,0);

for(var i=0;i

Re: Help with javascript extensions in Scriptographer
Date:  8. June 2008, 19:18

You're not doing anything with what you get back from the Dialog.prompt.

you're putting the values that you get back into a global variable called 'values' so:

var firstValue = values[0];

etc

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
L-System 26.10.11