Illustrator - moving swatch to swtachgroup

Hi,

I am trying script illustrator CS6, so that it creates a swatchgroup, than a RGB swatch (eventually many RGB swatches) and finally, that it moves the created swatch into the swatchgroup.

I succeed in created as many swatchegroup or swatch as I want, but I’m stuck when it comes to move the created swatch into the swatch group…

Any idea on how to do it?

Here is where I am with the code:

tell application "Adobe Illustrator"
	activate
	
	set thisDoc to current document
	
	if not (exists swatchgroup "Samplegroup01" in thisDoc) then
		make new swatchgroup in thisDoc with properties ¬
			{name:"Samplegroup01"}
	end if
	
	if not (exists swatch "MyColor01" in thisDoc) then
		make new swatch in thisDoc with properties ¬
			{name:"MyColor01", color:{red:95.0, green:189.0, blue:82.0}}
	end if
end tell

TIA

Hi everyone,

It seems that nobody knew the answer…
But I finally find a way to make it work!

Enjoy!

If someone can make it better go for it.
But, it is not broken, no need to fix yet…

tell application "Adobe Illustrator"
	activate
	
	set thisDoc to current document
	
	if not (exists swatchgroup "Samplegroup01" in thisDoc) then
		make new swatchgroup in thisDoc with properties ¬
			{name:"Samplegroup01"}
	end if
	
	if not (exists swatch "MyColor01" in thisDoc) then
		make new swatch in thisDoc with properties ¬
			{name:"MyColor01", color:{red:95.0, green:189.0, blue:82.0}}
	end if
	set Samplegroup01 to swatchgroup "Samplegroup01" of thisDoc
	set MyColor01 to swatch "MyColor01" of thisDoc
	add swatch Samplegroup01 ¬
		swatch MyColor01
end tell