ScriptSpot

Forum topic · General Scripting

Break PickObject()

By nicographx · 2009-08-03

Description

Hello,

Is-it possible to break the pickobject of multiple selection ?
I have a checkbutton with a pickobject (see code)
When I uncheck this button I want this stop pickobject (#escape)
Thanks for your help

on myButton changed state do
(
if (state == true) then
(
local objs = #()
num = 1
objs = pickobject count:#multiple
for i in objs do
(
i.name = (num as string)
num+=1
)
myButton.checked = false
)
else
(

// HERE THE BREAK ACTION... ???
// I TRY return #escape and lots of things, but nothing works
)
)

Comments (4)

Anubis · 2009-08-04

Then maybe using while will be more short and clear code, like:

on myButton changed state do while state do -- ...code here

nicographx · 2009-08-07

Yes thanks, but the problem is the same : the pickobject is active while user break it (by escape button or right click)

nicographx · 2009-08-03

Thanks for response
I see this topic, but this is for pickbutton.
I need to select multiple objects, so this doesn't work.
Any idea ?