Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Who is the Craziest Guy in this Forum?


  • Please log in to reply
15 replies to this topic
SpamAlert
  • Guests
  • Last active:
  • Joined: --

Who is the Craziest Guy in this Forum?

The Colorful text seen above was created with the help of following script:
/*
   Rainbow Text formatting for BBCode 

   Written by : Anonymous - 15 May 2006
   License    : Public Domain

   Run this Script and
   while posting/editing a post

   1) Block the text 
   2) Copy it
   3) press CTRL+WIN+ALT+F2

   Text will be converted & pasted.

*/

^#!F2::GoSub, RainbowColors 

RainbowColors:
 WinID:=WinExist("A")
 Send ^C

 Text:=Clipboard
 ReturnText:=
 Ctr=1

  Loop, PARSE, Text
   {
     If A_LoopField = %A_Space%
        ReturnText = % ReturnText A_Space
     else
      {
        ConvChar:= "[color=#" RandomHexColor(50,200) "][b]" A_LoopField "[/b][/color]"
        ReturnText = % ReturnText ConvChar
      }
     Ctr+=1
     If Ctr>7
        Ctr=1
   }

ReturnText= % "[quote][size=18]" ReturnText "[/size][/quote]"
Winactivate, ahk_id %WinID%
SendRaw, % ReturnText

Return

RandomHexColor(Range1,Range2) 
{

 Random, _RGB1, %Range1%, %Range2%
 Random, _RGB2, %Range1%, %Range2%
 Random, _RGB3, %Range1%, %Range2%

 SetFormat, Integer, Hex 
 _RGB1+=0 
 _RGB2+=0 
 _RGB3+=0 

 If StrLen(_RGB1) = 3 
    _RGB1= 0%_RGB1% 

 If StrLen(_RGB2) = 3 
    _RGB2= 0%_RGB2% 

 If StrLen(_RGB3) = 3 
    _RGB3= 0%_RGB3% 

 SetFormat, Integer, D 
 HEXString = % _RGB1 _RGB2 _RGB3 
 StringReplace, HEXString, HEXString,0x,,All 
 StringUpper, HEXString, HEXString 
Return HexString
}

* Anonymous *

BoBo
  • Guests
  • Last active:
  • Joined: --
Me!

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
Why do you exclude ladies from the competition? Otherwise, I second the nomination above.

…and the script is nice, too. I like slow changing colors, so how about an option, that make the colors of consecutive letters to differ at most by a given limit (different for each component, so I could stay within reds), starting from a specified initial color?

Why don't you extend the title of the thread with something like "(Rainbow Text for BBCode)"? This way it would be easier to find the script the next time I propose a girl in the forum.

  • Guests
  • Last active:
  • Joined: --
It might have been wise to post this under another name. SpamAlert does not sound like a name many people would like to read the messages of (except for BoBo, ans Laszlo, and... well, me, and over a hundred others).
Funny script though!

Ace_NoOne
  • Members
  • 299 posts
  • Last active: May 02 2008 08:19 AM
  • Joined: 10 Oct 2005
Funny thread...

I like Laszlo's suggestion about the gradually changing colors.
However, I've tried similar things before, but due to my lack of knowledge about color theory (or whatever you need to know to pull this off), I never really knew how to do it.

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
rangeCL := 50
rangeCH := 240
rangeDCL := -10
rangeDCH := +10

Escape::
	Random colorR, %rangeCL%, %rangeCH%
	Random colorG, %rangeCL%, %rangeCH%
	Random colorB, %rangeCL%, %rangeCH%
	Random dcR, %rangeDCL%, %rangeDCH%
	Random dcG, %rangeDCL%, %rangeDCH%
	Random dcB, %rangeDCL%, %rangeDCH%

	text := Clipboard
	s = %colorR% %colorG% %colorB%`n%dcR% %dcG% %dcB%`n
	returnText = [quote][size=18][b]
	Ctr=1

	Loop Parse, text
	{
		If (A_LoopField = " ")
			returnText := returnText . A_LoopField
		Else
		{
			color := GetNextColor(colorR, colorG, colorB, dcR, dcG, dcB)
			convChar = [color=#%color%]%A_LoopField%[/color]
			returnText = %returnText%%convChar%
		}
	}

	returnText= %returnText%[/b][/size][/quote]
	returnText= %returnText%`n%s%%colorR% %colorG% %colorB%
	clipboard := returnText
ExitApp

GetNextColor(ByRef @colorR, ByRef @colorG, ByRef @colorB
		, dcR, dcG, dcB)
{
	local cR, cG, cB

	@colorR += dcR
	@colorG += dcG
	@colorB += dcB
	If (@colorR < 0 || @colorR > 255)
		@colorR -= dcR
	If (@colorG < 0 || @colorG > 255)
		@colorG -= dcG
	If (@colorB < 0 || @colorB > 255)
		@colorB -= dcB
	SetFormat Integer, Hex
	color := 0x1000000 + (@colorR << 16) + (@colorG << 8) + @colorB
	StringTrimLeft color, color, 3
	SetFormat Integer, D
	return color
}
Sample outputs:

Philippe Lhoste

Start: 174 152 59
Steps: -6 5 -3
End: 90 222 17

Philippe Lhoste

Start: 135 64 120
Steps: 6 -10 9
End: 219 4 246
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

Ace_NoOne
  • Members
  • 299 posts
  • Last active: May 02 2008 08:19 AM
  • Joined: 10 Oct 2005
Beautiful!

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005

Beautiful!

Really! Now I only need to find that girl...

Ace_NoOne
  • Members
  • 299 posts
  • Last active: May 02 2008 08:19 AM
  • Joined: 10 Oct 2005

[...] next time I propose a girl in the forum.

I do not know why you'd only want to propose to girls in this forum, but alright - I'll go find some coding chicks for you then...

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005

I do not know why you'd only want to propose to girls...

Do you mean to men? I know, it is legal in many states now... I just could not imagine any other application of the rainbow colored text. Maybe, an invitation to my birthday party?

BoBo
  • Guests
  • Last active:
  • Joined: --

Maybe, an invitation to my birthday party?

:idea: Hint hint! :!: :D

Ace_NoOne
  • Members
  • 299 posts
  • Last active: May 02 2008 08:19 AM
  • Joined: 10 Oct 2005

I do not know why you'd only want to propose to girls...

Do you mean to men? I know, it is legal in many states now...

Oh SNAP! That's one evil, yet brilliant piece of word-twisting there... :shock:
However, I can disprove your interpretation: "girls in this forum" is a single entity on the sentence-level, functioning as direct object (Od). "in this forum" is the post-modifier to the head of this Od (i.e. "girls").
You, however, made it look like "in this forum" was an adjunct (adverbial of place) on the sentence-level, which was not intended.
-- PWNED by 1337 grammar skillz* :p


* Disclaimer: No responsibility is taken for the correctness of this information. For further information, please visit your local university.

  • Guests
  • Last active:
  • Joined: --
:lol:

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
Of course I knew what you meant, Ace_NoOne. It just offered a cheap shot. No offense.

Ace_NoOne
  • Members
  • 299 posts
  • Last active: May 02 2008 08:19 AM
  • Joined: 10 Oct 2005

Of course I knew what you meant, Ace_NoOne. It just offered a cheap shot. No offense.

Geez, I know - and I gave you my riposte.
With this calm and rational response, however, you stole the magic - guess there's no bitch fight for me tonight then... :(