Create a confirm dialogue when you delete

Is there a wat to create a confirm dialgue box when you delete something???
My del key is near that all other animation hotkey, and sometime I delete some objects :confused:
Undo?? Ok, but I run with some expressions where I sometimes can't Undo :confused:
Is there a way? I don't know how create script job for call this confirm box, and i don't know detect the delete fonction.

Thanks in advance....

I drink 3D all morning...
<< http://grain.s.free.fr >>

It's straight forward enough to write a script job to do somthing when a object is deleted, but if you can't use the undo to get it back, then I can't see a way to do this.
This might get you started though, it basicaly dose what you asked, but it still uses a undo to bring the object back.

global proc DelWarn()
{
string $Confirm;

$Confirm = `confirmDialog -title "Confirm" -message "Are you sure?" -button "Yes" -button "No" -defaultButton "Yes" -cancelButton "No" -dismissString "No"`;

if ($Confirm != "Yes") undo;

}

int $jobNum = scriptJob -ct "delete" "DelWarn";

Richard

Thanks, but... I can't undo anyway.... so I have need a script job who confirm delete BEFORE delete!! I don't know if it' s possible

(I can't undo because I have some expressions who do some multi operations...)

Thanks in advance...

I drink 3D all morning...
<< http://grain.s.free.fr >>