mIRC Homepage
Posted By: MTec89 huge list - 13/03/05 05:42 PM
i am trying to create a huge list of all the colors (in hex; #000000 etc)
starting from #FFFFFF at the top, and working all he way down to #000000 at the bottom. im not really sure at all how to begin to do this though
afaik, the letter and number combos are A - F, 0 - 9 so as you can see this would make a really big list.
Posted By: starbucks_mafia Re: huge list - 13/03/05 06:18 PM
The list will be 16777216 items long. Far too long to read or be of any practical use for anything. The window buffer isn't large enough to store even a fraction of the list. mIRC scripting simply can't produce it in any reasonable amount of time. What's the point of it anyway?

If it's just as a matter of interest in how to do it:
Code:
listhex {
  if ($window(@hexcolours)) clear @hexcolours
  window -h @hexcolours
  var %i = 16777215
  while %i {
    echo @hexcolours $+($chr(35),$base(%i,10,16,6))
    dec %i
  }
  echo @hexcolours #000000
  window -wa @hexcolours
}


Notice the use of /window's -h switch to hide the window while it's being worked on. This makes the operation 4-10x faster.
Posted By: MTec89 Re: huge list - 13/03/05 06:22 PM
well this is actually for a VB list box, but writing the list to a text file will suffice it does not have to be an @window
Posted By: starbucks_mafia Re: huge list - 13/03/05 06:27 PM
Writing to a file would likely take even longer. If it's for a VB listbox why not write the code in VB?
Posted By: MTec89 Re: huge list - 13/03/05 06:41 PM
i dont know how to do that either!! blush
Posted By: tidy_trax Re: huge list - 13/03/05 06:43 PM
Code:
dim i as long
i = 16777215
while i > 0
list1.additem "#" & hex(i)
i = i - 1
wend
list1.additem "#000000"
Posted By: MTec89 Re: huge list - 13/03/05 06:46 PM
well i dont want the user to wait for hours for tha code, but i can use it to get the list
Posted By: MTec89 Re: huge list - 13/03/05 08:51 PM
i cant get the list. the program doesnt finish, it just goes into not responding, mirc too.
Posted By: tidy_trax Re: huge list - 13/03/05 09:21 PM
Visual basic isn't the greatest of languages to do anything too CPU intensive, you should use a language that supports multi-threading like C++.
Posted By: MTec89 Re: huge list - 13/03/05 10:37 PM
no thanks. vb owns all... its the most popular too.
Posted By: FiberOPtics Re: huge list - 13/03/05 10:42 PM
I made a small vbscript snippet and it got that list in under 2 mins. The .txt file is 142 mb though, totally useless. What is this for anyway? As if anyone is crazy enough to scroll in a list that's so long.

Just let them make the hex color and use a verifier on it, or what do you need this for?
Posted By: tidy_trax Re: huge list - 13/03/05 10:46 PM
Quote:
its the most popular too.


Yeah and pigs fly.
Posted By: MTec89 Re: huge list - 13/03/05 10:57 PM
And I quote...

Quote:
Visual Basic (VB) is a RAD (Rapid Application Development) tool, that allows programmers to create Windows applications in very little time. It is the most popular programming language in the world, and has more programmers and lines of code than any of its nearest competitors.
Posted By: MTec89 Re: huge list - 13/03/05 10:59 PM
damn... that sucks.. 142mb...what am i supposed to do now smirk
im trying to give the user a selction of all the colors to pick from...
Posted By: tidy_trax Re: huge list - 13/03/05 11:00 PM
Use the common dialog (Colour).

Edit: why are you asking vb questions on a mIRC forum anyway?
Posted By: MTec89 Re: huge list - 13/03/05 11:19 PM
i dont know what that is.. blush

i originally wanted a mirc sciprt... remember?
Posted By: DaveC Re: huge list - 13/03/05 11:28 PM
Quote:
Visual Basic (VB) is a RAD (Rapid Application Development) tool, that allows programmers to create Windows applications in very little time. It is the most popular programming language in the world, and has more programmers and lines of code than any of its nearest competitors.


That "most popular programming language" becomes true when and only when it is applied with "and has more programmers and lines of code than its nearest competitor"

And even then im not sure if thats strictly true even! Sounds more like a MS advert for there software than anything else.

I dont know the totals but I beleieve Cobol likely still outnumbers vb for lines of code, just not programmers.

This has digressed anyway...

I would suggest you google a search for "html color codes list" and just draw down one of them for your listy of hexvalues and colors
Posted By: FiberOPtics Re: huge list - 13/03/05 11:29 PM
The CommonDialog Control

It's very easy to use, I've used it with COM before, but not the showcolor method, rather the showopen method. It even comes with a vb example, what more can you want grin
Posted By: MTec89 Re: huge list - 14/03/05 12:02 AM
mm.. ko...w/e

i did search google they dont have the complete list any where
Posted By: The_Game Re: huge list - 14/03/05 05:56 AM
Search Google using the Keywords HTML color reference. Here is one of the results:

Color Index

I hope this is what ya meant..if not my bad
Posted By: MTec89 Re: huge list - 14/03/05 08:12 PM
thats not the whole list, but i've given up on the list its way too big
Posted By: CtrlAltDel Re: huge list - 15/03/05 12:40 AM
Only 216 colors of that huge list can be seen the same by all browsers. The rest are "dithered" by the different browsers to something else (each browser is different).

Look Here
Posted By: MTec89 Re: huge list - 15/03/05 07:49 PM
yeah after i took time to read the text instead of jumping for all the colors i saw that, .. get ready for this... theres always a flaw in the plan.. unfortunatly no one sorts the numbers by the color it represents :P lolo
© mIRC Discussion Forums