mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Re: * $input: cannot use in an event [Re: westor] #230273
03/03/11 02:32 PM
03/03/11 02:32 PM
Joined: Oct 2004
Posts: 8,327
MA, USA
Riamus2 Offline
Hoopy frood
Riamus2  Offline
Hoopy frood

Joined: Oct 2004
Posts: 8,327
MA, USA
What isn't working with it? Does it pop up the $input?

As for your update script, you should do this instead...

Code:
on *:sockclose:mysock: {
  .timer 1 1 CheckUpdate
}
alias CheckUpdate {
  if ($input(Do you want to update?,y)) {
    ; whatever commands to do the update
  }
  else {
    ; whatever commands if you don't want the update
  }
}


* You can, of course, rename the alias and adjust the input text.

Last edited by Riamus2; 03/03/11 03:34 PM.

Invision Support
#Invision on irc.irchighway.net
Re: * $input: cannot use in an event [Re: Riamus2] #230276
03/03/11 02:42 PM
03/03/11 02:42 PM
Joined: Dec 2008
Posts: 1,511
Greece
westor Offline OP
Hoopy frood
westor  Offline OP
Hoopy frood

Joined: Dec 2008
Posts: 1,511
Greece
I tryied but return the same error * $input cannot use in an event


Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-
Re: * $input: cannot use in an event [Re: westor] #230277
03/03/11 02:44 PM
03/03/11 02:44 PM
Joined: Jan 2007
Posts: 1,156
Seattle
D
DJ_Sol Offline
Hoopy frood
DJ_Sol  Offline
Hoopy frood
D

Joined: Jan 2007
Posts: 1,156
Seattle
Yeah using an alias would be much better.

I personally have a dialog for my updates. I have a list with checkboxes for each file. When the update is finished it removes the updated files from the list so you can check more updates or close the dialog.

Re: * $input: cannot use in an event [Re: westor] #230278
03/03/11 02:44 PM
03/03/11 02:44 PM
Joined: Oct 2004
Posts: 8,327
MA, USA
Riamus2 Offline
Hoopy frood
Riamus2  Offline
Hoopy frood

Joined: Oct 2004
Posts: 8,327
MA, USA
See the edit. I missed a character. That should work now. I can't test right now.


Invision Support
#Invision on irc.irchighway.net
Re: * $input: cannot use in an event [Re: DJ_Sol] #230279
03/03/11 02:47 PM
03/03/11 02:47 PM
Joined: Oct 2004
Posts: 8,327
MA, USA
Riamus2 Offline
Hoopy frood
Riamus2  Offline
Hoopy frood

Joined: Oct 2004
Posts: 8,327
MA, USA
Yeah, a real dialog is a very good option. $input is useful for really minor things, but using a real dialog gives you far greater control and customization. And dialogs can be used anywhere. $input halts everything that follows it, which is why it cannot be used in an event. Dialogs don't halt anything, so they can be used in events without a problem.


Invision Support
#Invision on irc.irchighway.net
Re: * $input: cannot use in an event [Re: Riamus2] #230282
03/03/11 02:54 PM
03/03/11 02:54 PM
Joined: Dec 2008
Posts: 1,511
Greece
westor Offline OP
Hoopy frood
westor  Offline OP
Hoopy frood

Joined: Dec 2008
Posts: 1,511
Greece
Any way i will change it with a dialog option, the code still not working! the input does not opening to select yes or no!


Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-
Re: * $input: cannot use in an event [Re: Riamus2] #230286
03/03/11 03:16 PM
03/03/11 03:16 PM
Joined: Feb 2006
Posts: 546
J
jaytea Offline
Fjord artisan
jaytea  Offline
Fjord artisan
J

Joined: Feb 2006
Posts: 546
Sat wrote an article that highlights the difference between these types of events:

http://www.xise.nl/mirc/wiki/doku.php?id=critical_events

there are cases where it is much more convenient to circumvent mIRC's detection of $input in a 'critical' event (and it is actually possible to do so in mIRC script) but this isn't one of those cases :P using a split second timer to call an alias containing the appropriate segment of code is easy here.


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Re: * $input: cannot use in an event [Re: westor] #230288
03/03/11 03:20 PM
03/03/11 03:20 PM
Joined: Jan 2007
Posts: 1,156
Seattle
D
DJ_Sol Offline
Hoopy frood
DJ_Sol  Offline
Hoopy frood
D

Joined: Jan 2007
Posts: 1,156
Seattle
If you really want to use $input just use a timer for the alias.

on *:sockclose:mysock: {
timer -m 1 500 CheckUpdate
}

Re: * $input: cannot use in an event [Re: DJ_Sol] #230293
03/03/11 03:34 PM
03/03/11 03:34 PM
Joined: Oct 2004
Posts: 8,327
MA, USA
Riamus2 Offline
Hoopy frood
Riamus2  Offline
Hoopy frood

Joined: Oct 2004
Posts: 8,327
MA, USA
Yeah, I forgot the timer. Oops. wink


Invision Support
#Invision on irc.irchighway.net
Re: * $input: cannot use in an event [Re: Riamus2] #230295
03/03/11 04:26 PM
03/03/11 04:26 PM
Joined: Dec 2008
Posts: 1,511
Greece
westor Offline OP
Hoopy frood
westor  Offline OP
Hoopy frood

Joined: Dec 2008
Posts: 1,511
Greece
Any way i have change my code removing the update confirmation whistle


Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-
Re: * $input: cannot use in an event [Re: westor] #230296
03/03/11 04:27 PM
03/03/11 04:27 PM
Joined: Dec 2008
Posts: 1,511
Greece
westor Offline OP
Hoopy frood
westor  Offline OP
Hoopy frood

Joined: Dec 2008
Posts: 1,511
Greece
Thanks all for the help!


Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-
Page 2 of 2 1 2