Macro stop working

I’m tryng to create a macro that change every point to a layer that has the point color name

selpts hide invert
selcolor rgb 190 190 190 0
-changelayer Pontos_Gray enterend
selnone
selcolor rgb 255 127 0 0
-changelayer Pontos_Orange enterend
selnone
.
.
.

but, If there is not a point in this color for example: rgb 255 127,
It still have to work, but it’s not working

Whats happening is that
“enterend” after “-changelayer Pontos_Orange” just stop the macro

Is this right?

Hello - if you need to check for a valid selection, then you really need to use a script.

-Pascal