mSLChampagne

mSLChampagne

Joined
Oct 18, 2010

Activity Stream

mSLChampagne commented on a Page, $CreateObject()  -  Feb 05, 2011

This code has been given a serious face lift. There's also far more documentation included within the snippet this time around.

 Respond  
mSLChampagne commented on a Page, mIRC Arrays v3  -  Jan 17, 2011

It's all in context though; you are right Jethro_. When used as an operator it utilizes an isMultiple() function of sorts ... when used in conjunction with a command it forces evaluation i.e. //noop $ident(a) $ident(b). But when used with nothing, simply // as it were, then there is no command to evaluate anything for. Same as Jaytea was saying with the empty command bit.

 Respond  
mSLChampagne commented on a Page, mIRC Arrays v3  -  Jan 16, 2011

Well, that is definitely an opinion as it is a legitimate method of commenting but in consideration of keeping to stricter standards I will add them for you.

 Respond  
mSLChampagne commented on a Page, mIRC Arrays v3  -  Jan 16, 2011

Here, this differs from the last one I pasted in that I simplified it. It also has an example at the end of it to better show it's usage.

It does require that you have .NET 2.0 at least I believe, which is really standard to have these days. Unless you're using linux. :> If that's the case then COM will only work (and terribly I might add) through the use of WINE or some other similar emulation.

alias -l inherits if (!$com($1)) halt
alias -l object { if (!$com($2)) .comopen $2 $1 
  return $iif($com($2).progid == $1,$2,$null)
}

alias array { 

  ; REM ## Object initialization ##
  inherits $object(system.collections.arraylist,$1)

  ; REM ## Method handling ##
  if ($2 == sort    ) noop $com($1,sort,1)
  if ($2 == clear   ) noop $com($1,clear,1)
  if ($2 == append  ) noop $com($1,add,1,string,$3)
  if ($2 == remove  ) noop $com($1,remove,1,int,$3)
  if ($2 == insert  ) noop $com($1,insert,1,int,$3,string,$4)
  if ($2 == removeat) noop $com($1,removeat,1,int,$3)
  if ($2 == reverse ) noop $com($1,reverse,1)
  if ($2 == delete  ) .comclose $1

  ; REM ## Property handling ##
  if ($2 == item  ) return $null($com($1,item,3,int,$3)) $com($1).result
  if ($2 == count ) return $null($com($1,count,3)) $com($1).result
  if ($2 == exists) return $null($com($1,contains,3,string,$3)) $com($1).result

}

alias test { 

  var %a = example, %b = 10

  ; REM ## Create an array by the name of "example."
  noop $array(%a)

  ; REM ## Populate the array with some data.
  while (%b) {
    noop $array(%a,append,%b)
    dec %b
  }

  ; REM ## Reverse the array.
  noop $array(%a,reverse)
  linesep

  ; REM ## Enumerate and echo each item in the array.
  %b = 0
  while ($array(%a,item,%b)) { 
    echo -a Item %b $+ : $v1
    inc %b
  }
  linesep

  ; REM ## Determining the size and whether an item (data) exists or not.
  echo -a Count: $array(%a,count)
  linesep
  noop $array(%a,append,z)
  echo -a Exists("z"): $array(%a,exists,z)
  linesep

  ; REM ## Bit sorting the array is the built-in default method shown here.
  noop $array(%a,sort)
  %b = 0
  while ($array(%a,item,%b)) {
    echo -a Item %b $+ : $v1
    inc %b
  }
  linesep

  ; REM ## Clearing and deleting an array.
  noop $array(%a,clear)
  noop $array(%a,delete)

  ; REM ## End of test.
  echo -a End of test.
  linesep

}
 Respond  
mSLChampagne commented on a Page, Notepad Dialog  -  Jan 16, 2011

Your local alias /notepadwrite seems to have been pasted incorrectly. As it is now the alias will not function properly.

 Respond  
mSLChampagne commented on a Page, mIRC Arrays v3  -  Jan 16, 2011

There's really no need to be snippy about it. We all know it's your thread and we all know you've pasted three variations. We are just showing you other methods to increase your knowledge by allowing you to see other methods in action. That way you can take it upon yourself to further your own instruction. Obviously, with the reaction you gave, you haven't much desire to take it upon yourself to learn anything past the norm. Since it is such a problem for me to do the same as sunslayer has for you I will remove mine.

 Respond  
mSLChampagne commented on a Page, mIRC Arrays v3  -  Jan 15, 2011

.

 Respond  
mSLChampagne commented on a Page, Console  -  Dec 09, 2010

Why thank you kind sir/ma'am. A rare soul who appreciates the subtle art that is COM. :)

 Respond  
mSLChampagne commented on a Page, DnD Roller  -  Dec 09, 2010

It does indeed! Of course, Jaytea is a dictator and won't allow any fun in #mSL anyway!

As a side note to Mr. Jaytea: Some of us still recall the original intent of #mSL and I do like to read over the things you type for all of us 'lesser' (used lightly) people regarding the internal functionality and behaviour of scripting with MSL. So, thanks a lot for explaining yourself here and elsewhere ... always a nice treat! :D

 Respond  
mSLChampagne commented on a Page, DnD Roller  -  Dec 05, 2010

I'm going to be honest, when I saw this ... I thought it had something to do with Dungeons and Dragons, in which case I'd have to abuse you. However, I am very pointedly wrong, thank the lord. This would an excellent snippet to use for in-house (#mSL) pickup yahtzee games.

 Respond  
mSLChampagne commented on a Page, Display  -  Nov 28, 2010

Possible, and entirely likely. ;D

 Respond  
mSLChampagne commented on a Page, $CreateObject()  -  Nov 28, 2010

Beyond comprehension apparently. ;p

Handles object creation in a sense; instead of dispatching multiple times in one script, this handles that dispatching, in other words.

 Respond  
mSLChampagne created a Page  -  Nov 28, 2010
188 

Change event, message, and highlight colours via script.

mSLChampagne created a Page  -  Nov 28, 2010
123 

Handles COM object dispatching.

mSLChampagne created a Page  -  Nov 28, 2010
608 

Allow or disallow highlights via script.

  1 Thread   mIRC  
mSLChampagne created a Page  -  Nov 28, 2010
1 319 

Stdout

mSLChampagne commented on a Page, Windows API Control  -  Oct 18, 2010

Yes, I go by a few alcoholic names. Corona and Everclear being amongst them. This account would have been deemed Champagne; as my old user alias had it not been taken already on this site.

 Respond  
mSLChampagne created a Page  -  Oct 18, 2010
343 

Windows API Control Implemented in mIRC.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.