Your first line does nothing -- it assigns a value to 'myFrame', but that gets overridden in the next line. It will also fail if there are no rectangles yet on that page. So it may do nothing at all if this piece of code is inside a "try ... catch" block -- the error handler will kick in on the very first line, and skip the rest.
What happens if you set the stroke weight to "10pt"?
Yes, you right about the first line, I removed it. When I do any other stroke, like 10pt, it changes to that measure, to 10 pt, but it doesn't change to 0 pt, but that's what I need.
Hmm-m. Try this one-line script on a selected object that has a visible stroke width. Does it work?
app.selection.strokeWeight = 0;I tried a few variants as well:
app.selection.strokeWeight = "0";
app.selection.strokeWeight = "0pt";
app.selection.strokeWeight = "0 pt";
app.selection.strokeWeight = "0 pt";and they all seem to work just fine.
I've tried that too, but it still doesn't work for me. It used to work, but it changed after latest update. Was any changes made by Adobe that could have caused it.