Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is that command that returns words from text?
Message
From
22/01/2008 10:43:55
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
22/01/2008 06:53:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01283877
Message ID:
01284049
Views:
24
>UPDATE: Oh, Hell. It's GetWordNum, but it won't help as what I'm trying to extract are the numeric values from an RGB() code. No actual words...
>
>
>nRedVal = 0
>nGreenVal = 0
>nBlueVal = 0
>SET Library to Foxtools.fll ADDITIVE
>llresult = RGBComp(nRGBColor, @nRedVal, @nGreenVal, @nBlueVal)
>
Thanks!

That worked, but only by doing it as seen below. Some of this is due to our data, but the function would not allow me to use SCATTER/GATHER to populate the variables/fields. I had to have differently named variable from the field for it to work.
SCAN

	m.ForeRed = crsRemarks.f_Red
	m.ForeGreen = crsRemarks.f_Green
	m.ForeBlue = crsRemarks.f_Blue
	cRGBForeColor = ALLTRIM(crsRemarks.sch_ForeColor)
	m.ForeResult = RGBComp(EVALUATE(cRGBForeColor), @ForeRed, @ForeGreen, @ForeBlue)
	REPLACE crsRemarks.f_Red WITH m.ForeRed
	REPLACE crsRemarks.f_Green WITH m.ForeGreen
	REPLACE crsRemarks.f_Blue WITH m.ForeBlue

	m.BackRed = crsRemarks.b_Red
	m.BackGreen = crsRemarks.b_Green
	m.BackBlue = crsRemarks.b_Blue
	cRGBBackColor = ALLTRIM(crsRemarks.sch_BackColor)
	m.BackResult = RGBComp(EVALUATE(cRGBBackColor), @BackRed, @BackGreen, @BackBlue)
	REPLACE crsRemarks.b_Red WITH m.BackRed
	REPLACE crsRemarks.b_Green WITH m.BackGreen
	REPLACE crsRemarks.b_Blue WITH m.BackBlue

ENDSCAN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform