Jump to content

hixxy

Members
  • Posts

    72
  • Joined

  • Last visited

Everything posted by hixxy

  1. You're right, $!(|) works fine Try this mate: //timer 1 1 echo -a a $chr(124) b As you will see it throws a "b unknown command" error. The way to get around this is by using $!chr(124) //timer 1 1 echo -a a $chr(124) b evaluates $chr(124) to plaintext "|" when the /timer command is first executed, then plaintext "|" is evaluated to special meaning "|" at the time that the timer fires. Using my version, //timer 1 1 echo -a a $!chr(124) b evaluates $!chr(124) to "$chr(124)" when the /timer command is first executed, then $chr(124) is evaluated to plaintext "|" at the time that the timer fires.
  2. You must be doing something wrong, because it works fine for me: //topic # test $chr(124) test | timer 1 1 echo -a $!chan( # ).topic Output: * Timer 1 activated (13:23:54) * hixxy changes topic to 'test | test' test | test * Timer 1 halted The example you posted is not the same as what I gave you.. for your example to work of echoing a pipe as plain text you would need to do this: //timer 1 1 echo -a hahha $!chr(124) hahha Or: //timer 1 1 echo -a hahha $!(|,) hahha Same problem as I demonstrated in my earlier post, you would need to use $!chr(124)
  3. FYI you could have just done this: .timer 1 1 hadd cProt TOPIC $+ # $!chan( # ).topic Timers evaluate everything twice (once at the time of the execution of the /timer command, and once again at the time the actual timer fires)... so you need to make sure anything you pass to it is escaped. You can see what I'm talking about by typing these two lines of code in your status window: //echo -a $!me * this echoes the literal text "$me" //.timer 1 1 echo -a $!me * this echoes your nickname.
  4. The problem with your $iif() statement is that you have closed the bracket too early: did $iif($did(96).text) == $null,-b,-e) $dname 97 I have highlighted the brackets in different colours so you can see which ones are matching brackets and which aren't. You need to remove the second blue bracket in order for you to have a bracket match. As for your code, it seems fine. The $left() thing you're doing doesn't make a lot of sense but it shouldn't cause any problems with your code. Maybe the problem lies elsewhere, try posting the entire on dialog code block.
  5. hixxy

    Mdx Button

    When correcting people you should make sure that you're correct first. Identifiers like $nick, $chan, $dname, $did, etc, are passed on to any custom aliases that are called from within an event definition where that identifier was filled. You can check this by using the following code: dialog t { size -1 -1 300 300 } on *:dialog:t:init:*: update alias update echo -a $dname Then just type "/dialog -m t t" without the quotes and you should see the letter "t" (the dialog name) echoed in the active window.
  6. Perhaps vista is stricter then, but this is also the way things should've been done on XP and earlier OS's as well.
  7. It's not a change to support vista, it's a change to become an application that's compliant with Windows. If you run mIRC from a non administrator account then you may find that it doesn't have permission to write to the Program Files folder, however it IS allowed to write to the Application Data folder or Roaming folder. The only thing that has changed is the location of the directory, you can still use $mircdir as long as everything has been installed correctly. You don't need to use the location of the exe.
  8. No you don't. //if ([*] iswm [x]) { echo -a WEJKDIKSDJH }
  9. Seeing as they both have a common message in the kicks ("Banned for <time>") you could always try this. on !*:kick:#:{ if ($knick == $me) && ($regex($1-,/banned for (\d++)(?= |$)/i)) { .timer 1 $regml(1) join $chan } }
  10. There's no reason why it should be staying open, but your code is a bit yuck. The way you've written it will trigger the script if somebody types !joins or !parts. I'd use something like this instead: on admin:text:!join ?*:#: join % $+ #$2 on admin:text:!part ?*:#: part % $+ #$2
  11. What do you mean? a { b { c } } Becomes: a { b { c } } When you hit the "{ }" button. What else are you talking about?
  12. on *:text:!readsug:#:{ var %handle = handle $+ $ticks, %file = complaints\suggestion.ini if (!$isfile(%file)) { msg $chan There is no suggestions file to read from. } else { .fopen %handle %file if (!$ferr) { while (!$feof) { msg $chan $fread(%handle) } .fclose %handle } } }
  13. hixxy

    Needs Codes

    No you can't. "me:" is an event prefix (much like !, & and ^), not a user level, so you would have to use this: on me:*:join:#:{ } However, he wanted to do something when he joined, but something else when somebody else joined, so his own code was perfectly fine for that purpose.
  14. Perhaps the line doesn't end in a CRLF, which would cause no bytes to be read into &x. Try using sockread -fn instead. What The Gate Keeper recommended should stop the error, but it might mean that you miss data. TGK: Fyi, you could use $sockbr there instead of $bvar(&x,0)
  15. I see, well I wouldn't know about that. But you can send multiple messages the way I showed, which is just as good.
  16. hixxy

    Custom Theme

    Yeah, I was taught the right way /halt will stop the current scope and also all calling scopes. So if you did this: alias a { b | c } alias b { halt } alias c { echo -s b } Then call /a, /c will never be called because /b uses /halt, which not only halts /b, but also /a (because /a is what called /b). /return will only stop the current scope: alias a { b | c } alias b { return } alias c { echo -s b } In this, /c will be called, because the /return in /b only stops /b, not /a too, so processing can continue and /c will be called. /haltdef is completely different, and doesn't do anything even anywhere near similar to what /halt or /return do. In fact, the only similarity it has with /halt is the name. You can put /haltdef anywhere you like. Add this to remote: on *:sockopen:google:{ haltdef | echo -s * This still triggers } Now type: /sockopen google google.com 80 You'll see a message in the status window, which shows that /haltdef did not halt processing in that scope.
  17. hixxy

    Custom Theme

    I don't know where you read that, but it doesn't matter where /haltdef goes as it doesn't halt anything like /return or /halt does.
  18. That will not work because CRLFs are used to delimit commands in the IRC protocol, like most others. This means that to send multiple lines to a channel you will have to issue multiple PRIVMSG commands, like so: "PRIVMSG #channel :Line one" & Chr(13) & Chr(10) & "PRIVMSG #channel :Line two" & Chr(13) & Chr(10) Chr(10) by itself is just a line feed. You must also use a carriage return - Chr(13)
  19. hixxy

    %# Question

    You're being pretty vague about what "exactly" caused these errors. I have given you code that shows you do not need to use $chr(), and also shown you that you can pass %#blah as a parameter without having mIRC evaluate it. I'm not sure exactly what you did to get the error, but it was down to a scripting error.
  20. hixxy

    %# Question

    I understand all of that, but what I gave him works fine. Try typing this in mIRC: //echo -a % $+ test You will see "%test" in the active window. This shows that mIRC has in fact NOT evaluated the string as a variable. The same can be used for channels: % $+ #chan You could also use $(%#chan,0) or $eval(%#chan,0), but whichever way you use (% $+ #chan being the shortest), there's no need to use two $chr()s No, that is wrong. alias test { echo -a $1 } Now type this (exactly this) in the status window: /test %#x You will see "%#x" come up. The "echo -a $1" will only evaluate $1 once, which will turn it into %#x, you would have to evaluate it again to get the value of that variable. For mIRC to do what you're saying, you would have to change the /test alias to this: alias test { echo -a $eval($1,2) } You have probably ran into problems with calling aliases on a timer or something which has misled you, but that is because timers evaluate everything an extra time.
  21. hixxy

    %# Question

    Why use $chr() when you can just use the actual characters like I did?
  22. The windows media player object model has functions to do with closedcaptioning. I never knew what closed captioning was so I never took a look at it, but you understand how to use $com it might be worth taking a look at the object model documentation on Microsoft's website.
  23. hixxy

    %# Question

    From command line: /msg %#channel (note I'm only using ONE slash here). From remote: msg % $+ #channel
  24. Cheers That was the 151 byte version though. I think more people would've entered if they knew how to translate the text. Don't let it put you off trying more
  25. 151 byte non-regex version: alias c var %i $len($1),%r | while $mid($1,%i,1) { %r = $+($iif($v1 !isalnum,$v1,$chr($calc(219-$asc($v1)))),%r) | dec %i } | return $left(%r,$len($1)) 69 byte regex version: alias d return $regsubex($1,/([a-z0-9])/gi,$chr($calc(219-$asc(\t)))) I'm not sure if regex is banned from challenges here like it is most other places, so I've done two versions $c(xzm blf tfvhh dszg gsrh rh?) = can you guess what this is? $d(xzm blf tfvhh dszg gsrh rh?) = can you guess what this is?
×
×
  • Create New...