can anybody provide a script to create a star
Hello,
Sure! Here’s a simple script to create a star pattern in JavaScript. This example will create a right triangle star pattern:
JavaScript securespend balance
let n = 5; // Number of rowslet string = "";
for (let i = 1; i <= n; i++) { for (let j = 0; j < i; j++) { string += "*"; } string += "\n";}
console.log(string);
Best Regards
esther598
Have you tried recording a macro?
Sub Macro2() ' Recorded 9. 9. 2024 Dim OrigSelection As ShapeRange Set OrigSelection = ActiveSelectionRange Dim s1 As Shape Set s1 = ActiveLayer.CreatePolygon2(6.612091, 1.884906, 1.655169, 5) s1.Fill.ApplyNoFill s1.Outline.SetPropertiesEx 0.007874, OutlineStyles(0), CreateCMYKColor(0, 0, 0, 100), ArrowHeads(0), ArrowHeads(0), cdrFalse, cdrFalse, cdrOutlineButtLineCaps, cdrOutlineMiterLineJoin, 0#, 100, MiterLimit:=5#, Justification:=cdrOutlineJustificationMiddleEnd Sub
I tried that too but it only leaves you with a pentagon.
Ok, you are correct.
Then try following code (now tested )
Sub Test()ActiveLayer.CreatePolygon 0, 5, 5, 0, 5, 1, 1, TrueEnd Sub
Yep. How to tweak it to be a perfect star?