Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REVERSE RGB(0,0,0,255,255,255) to RGB(255,255,255,0,0,0)
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00799797
Message ID:
00799851
Views:
33
Thanks George, but it became clear after reading Steve's solution that my goal was wrong to begin with. Don't know what I was thinking. I need to switch the pairs not reverse them! Now I really know its Friday!


>>I need to create a function that will reverse an RGB settings. If it is 0,0,0,255,255,255 then make it 255,255,255,0,0,0 etc regardless of what the foreground and background settings are. The closest I can get is to using AT for the ',' in the statement and then stripping out the numbers in between and then set it again going backwards from the results. Anyone have a better idea?
>>
>>TIA,
>
>Tracy,
>
>If the Windows Script Host is available, try this
lcstring = "RGB(0, 0, 0, 255, 255, 255)"
>oRE = CREATEOBJECT("VBScript.RegExp")
>oRE.Pattern = "(\d+)\, (\d+)\, (\d+)\, (\d+)\, (\d+)\, (\d+)"
>? oRE.Replace(lcstring, "$6, $5, $4, $3, $2, $1")
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform