Script to delete objects based on x position
Hi list,
I'm trying to prepare a script that delete certain types of objects in a subpatch, based on their types and also on the x position, declared by the message "del x". This script already worked before to delete all objects in the canvas, but I can't seem to make the > x condition work.
Can anyone have a look to see what I'm doing wrong?
Here is the patch and script:
Thanks,
jmmmp
why do you think obj.jsarguments[1] holds the position of an object?
Because I don't know anything about javascript.
How does that question help to get a solution?
The question points to the error in your script. Try replacing that with obj.rect[0]
are you guys going to build an eraser tool for the patching canvas?
Exactly, for certain types of objects. Thanks, it works like this.