mIRC Home    About    Download    Register    News    Help

Print Thread
#128028 19/08/05 11:23 PM
Joined: Jun 2005
Posts: 21
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jun 2005
Posts: 21
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?

#128029 19/08/05 11:28 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
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

#128030 19/08/05 11:32 PM
Joined: Jun 2005
Posts: 21
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Jun 2005
Posts: 21
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

#128031 20/08/05 12:54 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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


Link Copied to Clipboard