mIRC Home    About    Download    Register    News    Help

Print Thread
#146947 11/04/06 04:40 PM
Joined: Sep 2005
Posts: 116
I
Vogon poet
OP Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
i would like a "are u usre u wana unload .. .bla ? "

when unlaoding scripts since i accendentily unlaoded a NN script so it completely fooked now

#146948 11/04/06 10:13 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
This would suck. If you don't understand anything about
scripts then maybe you shouldn't be screwing around
with them and accidently unloading them.

#146949 12/04/06 09:55 AM
Joined: Sep 2005
Posts: 116
I
Vogon poet
OP Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
sjesus man who says i dont undersntad scripts ?

whne i was testing my script (to see if the loading worked on clean settings) i unloaded and reloaded it just when i wanted to click load i accendentily clicked unload so i unlaoded my script + the one of the nnscripts

#146950 12/04/06 10:14 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
/help on unload
/help $input


Gone.
#146951 12/04/06 12:03 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Good idea smile

Code:
on *:UNLOAD: {
  if (!$input(Are you sure you want to unload this script?,dwyk20,Unloading $nopath($script))) {
    var %i = 1
    while ($script(%i)) {
      if ($v1 == $script) {
        echo -acei2 info * Reloading script $+(',$script,') back into the $ord(%i) position.
        .timer 1 0 reload $+(-rs,%i) $qt($script)
        return
      }
      inc %i
    }
  }
}

#146952 12/04/06 12:11 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Sorry, didn't mean anything by it. There shouldn't be a
warning for unloading scripts IMO. I really would hate to
see this unless there were a check box that said something
like 'Always show this warning' selected by default, or
something. Actually I wish the LOAD event would have
the same option, and of course having somewhere in
the options dialog to enable/disable these, and only in
the options dialog.

Last edited by mIRCManiac; 12/04/06 12:34 PM.
#146953 12/04/06 01:12 PM
Joined: Sep 2005
Posts: 116
I
Vogon poet
OP Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
oke thanks for your help sorry i backfired so hard on it

#146954 12/04/06 01:22 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
If the script is as "fooked" as he describes it then reloading the file probably won't help.

#146955 12/04/06 01:28 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
The NN script as a system is probably only "fooked"
because this one file was unloaded, especially if there are
timers running to call aliases that are in this file. That's what
I thought he meant anyway. *shrug*

#146956 12/04/06 02:19 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
I didn't mention anything about reloading o.O but I guess it was directed to mIRCmaniac :tongue:


Gone.
#146957 12/04/06 02:24 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Well reloading was all I could think of, you can't stop
the script from being unloaded. Unless you meant just
to warn or something.

#146958 12/04/06 04:00 PM
Joined: Sep 2005
Posts: 116
I
Vogon poet
OP Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
well its acutaly wut i hoped for thanks :tongue:

and yes nns only fooked becase it missed something :tongue:

#146959 12/04/06 05:36 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Rather than using unload events. I agree if a script is unloaded in mIRC's EDITOR, it should prompt you for a confirmation.


NaquadaBomb
www.mirc-dll.com
#146960 13/04/06 09:00 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
No no, it was for you. Assuming that you were offering a scripted way to stop the script from unloading.. the on unload event doesn't let you stop the script from unloaded in any way (/haltdef, /return and /halt all do nothing), so I was pointing out that on unload wouldn't really help.

#146961 13/04/06 11:10 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Code:
on *:unload:{
  if (!$input(Are you sure you want to unload $script ?)) {
    .timer 1 0 .reload -rs $shortfn($script)
  }
}

This doesn't load it in the same position though, but like mircmaniac showed, that's possible as well, I just can't be bothered, as this is an example, not final code.


Gone.
#146962 13/04/06 11:35 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
That wouldn't really help if there was any other on unload code in the file as it could be triggered.

#146963 13/04/06 12:21 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
So? No one is saying it's perfect, but that's about as close as it will get. Atleast I'm trying to help him with something for the time being. He said himself that it is what he hoped for... (mircmaniacs code, my idea). I can't think of one reason why one would criticize the current help he's been given, because its only purpose is to help him, not to solve the feature suggestion, as it's not really possible to do it in a perfect way. We already know that, no need to repeat it all the time.


Gone.
#146964 13/04/06 04:14 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
In your original post you said nothing about it not being the exact thing he wanted.


Link Copied to Clipboard