mIRC Homepage
Posted By: FromTheSun remove not working - 19/08/05 11:23 PM
in a script i create a file, and then want to remove it when i close mirc using /remove

but

Code:
on:exit {
/remove %filename
}   


doesnt work

when i type "//remove %filename" it's working perfectly

Is there any workaround?
Posted By: MikeChat Re: remove not working - 19/08/05 11:28 PM
the problem is the way you typed the event part, just a little fix
on:exit {
/remove %filename
}

it should be

on *:exit:remove %filename
Posted By: FromTheSun Re: remove not working - 19/08/05 11:32 PM
Code:
on *:EXIT: {
  unset %variable2
  remove pic $+ %variable1 $+ .bmp
}


That's what it is now, variable 2 gets removed, while the picture won't get deleted
Posted By: SladeKraven Re: remove not working - 20/08/05 12:54 AM
Try doing the following:

//echo -a $isfile($+(pic,%variable1,.bmp)) if it returns $false the file doesn't exist.

//echo -a $var(%variable1) if it returns 0 the variable doesn't exist.

-Andy
© mIRC Discussion Forums