Jump to content

Warrior124

Members
  • Posts

    993
  • Joined

  • Last visited

Posts posted by Warrior124

  1. The 3 state check give 3 states to check instead of just two. Here is an example...

     

    dialog Test {
      title ""
      size -1 -1 58 22
      option dbu
      check "Push Me", 1, 4 7 50 10, 3state flat push
    }
    
    on *:dialog:test:sclick:1: {
      if ($did(1).state == 0) echo -a Beginning of state check.
      elseif ($did(1).state == 1) echo -a Middle of state check.
      elseif ($did(1).state == 2) echo -a End of state check.
    }
    
  2. Hey Travis. I don't know if you got the solution worked out, but did you have any updates to your AV software before these things started happening? If so the update may be causing problems connecting about any messenger. Also, if you are using an AV program, are you running the same AV program on all your pc's you're having problems with?

  3. Ok i got a friend they ae using just a mirc o connect to buzzen. my guest ban works or them on one of their pcs but it dosent work in same mirc on a different pc which has windows 7. Is there a guest ban that will work on windows 7??????????

     

    Hey CharmedOne. Great to see you. If you will, can you please post your code, and we'll see what we can do to help. :)

  4. i felt the same way about chat after msn closed. I sorta wondered around other servers following friends and scripting from time to time but the joy of chat and scripting just wasn't there anymore. One day I popped into Chainconn room on buzzen and the people there reminded me of the fun I once had in chat. Which in turn renewed my vigor for scripting. Though to be honest scripting is just a means to an end for me. I enjoy finding creative ways to solve problems. When it's not scripting it's webdesign. To be honest my ability to problem solve has improved due in large to things like scripting. It's why I strive to do things that I do not see others doing. It's about the process for me.

     

    There will never be another msn chat. I am still very fond of those days and many times wish msn was still around but I now just try to enjoy what is available. Within our community of chat networks nothing is on the scale of msn but i've found there is still some fun to be had if you find the right group of people to share it with.

     

    I know the feeling. I miss the days of msn chat, myself. From time to time I still script a little, but not nearly like I did back then.

  5. You had...

     

    dll colorcombo.dll COMBO options 1

     

    It needed to be...

     

    dll colorcombo.dll COMBO color 1

     

    Then you were missing a letter in one of your aliases, the letter a for the checkfont alias. I added it back in, and also added a bit more things that would be useful for you such as the FF alias (used for finding files quicker, and easier). The following are the codes...

     

    alias ff {
      var %test = $1-
      if (!%ff. [ $+ [  %test  ] ]) || (!$exists(%ff. [ $+ [  %test  ] ])) {
        if ($findfile(" $+ $nofile($mircexe) $+ ",%test,1)) || ($findfile(" $+ $mircdir $+ ",%test,1)) set %ff. [ $+ [  %test  ] ] " $+ $ifmatch $+ "
        else set %ff. [ $+ [  %test  ] ] " $+ $mircdir $+ %test $+ "
      }
      return %ff. [ $+ [  %test  ] ]
    }
    
    
    menu * {
      -
      Color Dialog: dialog -md color color
      -
    }
    
    dialog color {
      title "Color Changer"
      size -1 -1 112 40
      option dbu
      combo 1, 0 0 68 34, size drop
      button "Close", 4, 72 0 37 12, ok cancel
    }
    
    on *:DIALOG:color:init:*:{
      dll $ff(colorcombo.dll) COMBO color 1
      did -c $dname 1 5
    }
    on *:DIALOG:color:sclick:1:{
      if ($did(1).sel == 1) { /set %scolor #517693 }
      if ($did(1).sel == 2) { /set %scolor #FFFFFF }
      if ($did(1).sel == 3) { /set %scolor #000000 }
      if ($did(1).sel == 4) { /set %scolor #00007f }
      if ($did(1).sel == 5) { /set %scolor #009300 }
      if ($did(1).sel == 6) { /set %scolor #ff0000 }
      if ($did(1).sel == 7) { /set %scolor #7f0000 }
      if ($did(1).sel == 8) { /set %scolor #9c009c }
      if ($did(1).sel == 9) { /set %scolor #fc7f00 }
      if ($did(1).sel == 10) { /set %scolor #ffff00 }
      if ($did(1).sel == 11) { /set %scolor #00fc00 }
      if ($did(1).sel == 12) { /set %scolor #009393 }
      if ($did(1).sel == 13) { /set %scolor #00ffff }
      if ($did(1).sel == 14) { /set %scolor #0000fc }
      if ($did(1).sel == 15) { /set %scolor #ff00ff }
      if ($did(1).sel == 16) { /set %scolor #7f7f7f }
      if ($did(1).sel == 17) { /set %scolor #d2d2d2 }
    }
    
    alias color { return %scolor }
    alias buzzcolor { return [style ff:Arial;co: $+ $color $+;] $+ $1- $+ [/style] }
    
    alias checkfont {
      var %bf = $1-
      noop $regex(%bf,/(\[style.*?\])/)  |  var %font $regml(1) | var %fs $iif($gettok(%font,3,59) == b,$true,$false) | var %fc $left($gettok(%font,-1,35),6)
      var %fua $iif($gettok(%font,3,59) == u,$true,$false)  
      var %fub $iif($gettok(%font,4,59) == u,$true,$false)
      var %fuc $iif($gettok(%font,5,59) == u,$true,$false)
      if ((%fua == $true) || (%fub == $true) || (%fuc == $true)) { var %fu $true }
      else { var %fu $false }
      var %bf = $replace($regsubex(%bf,/(\[style (ff:.+?;|(bg)?co:.+?;|[ubi];|\bundefined\b)*?\]|\[\/style\])/ig,$null), ,$chr(32),&,&)
      return $iif(%fs == $true,,$null) $+ $iif(%fu == $true,,$null) $+  $+ $iif(%fc == $null,01,$hex2mirccolor(%fc)) $regsubex(%bf, /\[(?:style\x20.*?|/style)\]/gi,$null) $+ $iif(%Option.Theme.Bold == 2,)
    }
    alias hex2mirccolor {
      tokenize 46 $regsubex($1,/#?([a-f\d]{2})/gi,$base(\1,16,10) .)
      if ($1 == [style) { return 01 | halt }
      var %i = 0, %c, %d = 200000
      while %i < 16 {
        tokenize 32 $1-3 $replace($rgb($color(%i)),$chr(44),$chr(32))
        if $calc(($1 -$4)^2 + ($2 -$5)^2 + ($3 -$6)^2) < %d {
          %c = %i
          %d = $v1
        }
        inc %i
      }
      return %c
    }

  6. The connect bit refers to when you connect to a server. So, you will get errors if you are not in a channel. Try this code...

     

    on *:connect:.timeraway 0 300 nickchange
    alias -l nickchange {
      if ($active ischan) {
        if ($idle >= %atime) && (!$away) {
          nick $me $+ [away]
          away 4 auto away after %atime minutes
          ame 1auto4 away after %atime 1minutes
        }
      }
    }

  7. Hey Buddy,

     

    Hate to be a pest... but does the %getff variable ment to be evaluated?? I just tried your new code, and it doesnt update the variable unless you evaluate the %getff variable when you set it... =)

     

    alias ff {
      var %getff = $1-
      if (!%ff. [ $+ [ " $+ [ %getff ] $+ " ] ]) || (!$exists(%ff. [ $+ [ " $+ [ %getff ] $+ " ] ])) {
        if ($shortfn($findfile($nofile($mircexe),%getff,1))) set %ff. [ $+ [ " $+ [ %getff ] $+ " ] ] $ifmatch
        elseif ($shortfn($findfile($mircdir,%getff,1))) set %ff. [ $+ [ " $+ [ %getff ] $+ " ] ] $ifmatch
        else set %ff. [ $+ [ " $+ [ %getff ] $+ " ] ] " $+ $nofile($mircexe) $+ [ %getff ] $+ "
      }
      return %ff. [ $+ [ " $+ [ %getff ] $+ " ] ]
    }

     

    Thanks buddy, Its a handy little function I feel :)

     

    Kind Regards,

    Daniel

     

    Actually it evaluates fine for me, but that extra = sign does the same thing, lol. Thanks, Daniel. :)

     

     

    :oops: warrior123 ? ........ :lmaojump: you been working to hard err0r :P

     

    :lolwave:

  8. This addon is a new version of the ff alias. What it does is it will attempt to locate the specified file in the directory where you are running mirc, and its subdirectories. If it doesn't find the file there it will attempt to locate the file where your mirc.ini file is located, and its subdirectories. If it still doesn't find the file it will create a variable for the file which will be good if creating a new file. Another thing about this new code is you can find/make a file with spaces in the directory, and/or filename. :)

     

    alias ff {
      var %getff $1-
      if (!%ff. [ $+ [ " $+ %getff $+ " ] ]) || (!$exists(%ff. [ $+ [ " $+ %getff $+ " ] ])) {
        if ($shortfn($findfile($nofile($mircexe),%getff,1))) set %ff. [ $+ [ " $+ %getff $+ " ] ] $ifmatch
        elseif ($shortfn($findfile($mircdir,%getff,1))) set %ff. [ $+ [ " $+ %getff $+ " ] ] $ifmatch
        else set %ff. [ $+ [ " $+ %getff $+ " ] ] " $+ $nofile($mircexe) $+ %getff $+ "
      }
      return %ff. [ $+ [ " $+ %getff $+ " ] ]
    }

  9. Here is one that works much better. This will attempt to locate the specified file in the directory where you are running mirc, and its subdirectories. If it doesn't find the file there it will attempt to locate the file where your mirc.ini file is located, and its subdirectories. If it still doesn't find the file it will create a variable for the file which will be good if creating a new file. Another thing about this new code is you can find/make a file with spaces in the directory, and/or filename. :)

     

    alias ff {
      var %getff $1-
      if (!%ff. [ $+ [ " $+ %getff $+ " ] ]) || (!$exists(%ff. [ $+ [ " $+ %getff $+ " ] ])) {
        if ($shortfn($findfile($nofile($mircexe),%getff,1))) set %ff. [ $+ [ " $+ %getff $+ " ] ] $ifmatch
        elseif ($shortfn($findfile($mircdir,%getff,1))) set %ff. [ $+ [ " $+ %getff $+ " ] ] $ifmatch
        else set %ff. [ $+ [ " $+ %getff $+ " ] ] " $+ $nofile($mircexe) $+ %getff $+ "
      }
      return %ff. [ $+ [ " $+ %getff $+ " ] ]
    }

  10. Yes, that was intentional as if someone wanted to write to a file, and the file didn't exist, it would create the file when writing to it. That's an old code, however. I'm currently working on a better method. :)

  11. With the new versions of mirc they mainly install into your C:\Users\... directory for Windows 7, and somewhere else in Windows Vista as well as the directory you choose to install to. However, the mirc.ini file will more than likely not be in the directory you have chosen, and therefore the $mircdir will not be accurate. $mircdir/$scriptdir will refer to the directory the mirc.ini file is located in. $nofile($mircexe) refers to the directory the current mirc.exe is being run in.

  12. Try this...

     

    menu channel {
      -
      Sounds
      .On:enable #Sounds
      .Off:disable #Sounds
    }
    
    #Sounds on
    on *:Op:*:{ splay $shortfn($findfile($nofile($mircexe),Op.wav,1)) }
    on *:Join:*:{ splay $shortfn($findfile($nofile($mircexe),join.wav,1)) }
    on *:Part:*:{ splay $shortfn($findfile($nofile($mircexe),leave.wav,1)) }
    on *:kick:*:{ splay $shortfn($findfile($nofile($mircexe),kick.wav,1)) }
    raw *:*: {
      if ($numeric == 306) || ($numeric == 822) splay $shortfn($findfile($nofile($mircexe),away.wav,1))
      elseif ($numeric == 305) || ($numeric == 821) splay $shortfn($findfile($nofile($mircexe),back.wav,1))
    }

  13. dunno why these things always turn into a I know better than you debate..

     

    lol, reminds me of when you, and I were making a color dialog, and we kept constantly improving ours to keep up with the other, lol. A great contest, indeed. :pizza:

     

  14. :oops: I dont know how to asking this ... but I will try ... iv a basic away / back in my script which is in popups menu bar
    Set Away
    .On:/away $$ 
    .Off:/away

     

    now iv got sounds in my script for most things i.e join / leave / kick / Op but iv added two more to the little sound snippet away / back ... but for some reason they wont work ... can someone let me know where im going wrong please ... as always nais tuke = thank you for any help or an arrow to point me in the right direction and please dont make it to hard for me to understand :D

     

     

    menu channel {
      -
      Sounds
      .On:enable #Sounds
      .Off:disable #Sounds
    }
    
    #Sounds on
    on *:Op:*:{ splay Op.wav }
    on *:Join:*:{ splay join.wav }
    on *:Part:*:{ splay leave.wav }
    on *:kick:*:{ splay kick.wav }
    on *:away:*:{ splay away.wav }
    on *:back:*:{ splay back.wav }

     

    If I'm not mistaken I think you can pick up on aways from using raw numeric events. It's been a long time, and I forgot what those numerics are right now, but my advice is to use the following code to get the numerics when someone goes away, or comes back...

     

    Edit: the numerics are 306 for away, and 305 for unaway...

    raw *:*: {
      if ($numeric == 306) splay away.wav
      elseif ($numeric == 305) splay back.wav
    }

     

  15. And as for banning via regular expressions, i believe it was a limitation of the server, not our ability, which meant we couldn't do it that way.

     

    That is true. You can't do many things with regex unless you use an alias to accomplish what you need. That is what I did in Chat Guardian. My code made it to look for certain words, and performed an alias command to kick, and/or ban if Chat Defender was activated for that room. I am currently refining the code, and will have a new one available soon.

×
×
  • Create New...