Hello everyone,

I need help to modify this code so it will run continuously. The code now runs were if I have two or more areas that I need to divide the same distance, I have to start the code, pick one of the areas, and then hit enter, then start the code again. I would like to just be able to pick all the areas one after another and it divide them separate.

Thanks as always.

Code:
(DEFUN C:DIV2()(SETVAR "CMDECHO" 0)
(SETQ	SS1   (SSGET); Get selection set.
);_End SETQ
(COMMAND "DIVIDE" SS1 "2")
(SETVAR "CMDECHO" 1)
(princ)
);