mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#114301 13/03/05 05:42 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
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.


http://MTec89Net.com
irc.freenode.net #MTec89Net
#114302 13/03/05 06:18 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#114303 13/03/05 06:22 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
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


http://MTec89Net.com
irc.freenode.net #MTec89Net
#114304 13/03/05 06:27 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Writing to a file would likely take even longer. If it's for a VB listbox why not write the code in VB?


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#114305 13/03/05 06:41 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
i dont know how to do that either!! blush


http://MTec89Net.com
irc.freenode.net #MTec89Net
#114306 13/03/05 06:43 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
dim i as long
i = 16777215
while i > 0
list1.additem "#" & hex(i)
i = i - 1
wend
list1.additem "#000000"


New username: hixxy
#114307 13/03/05 06:46 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
well i dont want the user to wait for hours for tha code, but i can use it to get the list


http://MTec89Net.com
irc.freenode.net #MTec89Net
#114308 13/03/05 08:51 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
i cant get the list. the program doesnt finish, it just goes into not responding, mirc too.


http://MTec89Net.com
irc.freenode.net #MTec89Net
#114309 13/03/05 09:21 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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++.


New username: hixxy
#114310 13/03/05 10:37 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
no thanks. vb owns all... its the most popular too.


http://MTec89Net.com
irc.freenode.net #MTec89Net
#114311 13/03/05 10:42 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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?


Gone.
#114312 13/03/05 10:46 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Quote:
its the most popular too.


Yeah and pigs fly.


New username: hixxy
#114313 13/03/05 10:57 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
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.


http://MTec89Net.com
irc.freenode.net #MTec89Net
#114314 13/03/05 10:59 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
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...


http://MTec89Net.com
irc.freenode.net #MTec89Net
#114315 13/03/05 11:00 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Use the common dialog (Colour).

Edit: why are you asking vb questions on a mIRC forum anyway?

Last edited by tidy_trax; 13/03/05 11:01 PM.

New username: hixxy
#114316 13/03/05 11:19 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
i dont know what that is.. blush

i originally wanted a mirc sciprt... remember?


http://MTec89Net.com
irc.freenode.net #MTec89Net
#114317 13/03/05 11:28 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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

#114318 13/03/05 11:29 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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


Gone.
#114319 14/03/05 12:02 AM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
mm.. ko...w/e

i did search google they dont have the complete list any where


http://MTec89Net.com
irc.freenode.net #MTec89Net
#114320 14/03/05 05:56 AM
Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
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

#114321 14/03/05 08:12 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
thats not the whole list, but i've given up on the list its way too big


http://MTec89Net.com
irc.freenode.net #MTec89Net
#114322 15/03/05 12:40 AM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
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

#114323 15/03/05 07:49 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
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


http://MTec89Net.com
irc.freenode.net #MTec89Net
Page 1 of 2 1 2

Link Copied to Clipboard