mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
I tryied but return the same error * $input cannot use in an event


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
See the edit. I missed a character. That should work now. I can't test right now.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
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? -> https://irc.chathub.org <-
Joined: Feb 2006
Posts: 546
J
Fjord artisan
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
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
If you really want to use $input just use a timer for the alias.

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

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yeah, I forgot the timer. Oops. wink


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Any way i have change my code removing the update confirmation whistle


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Thanks all for the help!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Page 2 of 2 1 2

Link Copied to Clipboard