Syntax Help Please

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
Fuergrissa
GamingTools Subscriber
Posts: 31
Joined: Fri Jul 16, 2004 2:46 am

Syntax Help Please

Post by Fuergrissa » Wed Aug 02, 2006 1:03 am

HI all,

I am having difaculty trying to get this right, I can find the color of a pixel by using the Getpixel function, i am trying to validate the pixel color like so but get an invalid math function

Code: Select all

 echo ${Display.GetPixel[18,990]}
returns d6ffff

I want to check for that in a script but this is wrong

Code: Select all

if ${Display.GetPixel[18,990]}==d6ffff
fails with an invalid math function, can anyone please let me know what im doing wrong, its driving me nuts.

Thanks in advance.

Fuergrissa
GamingTools Subscriber
Posts: 31
Joined: Fri Jul 16, 2004 2:46 am

Post by Fuergrissa » Thu Aug 03, 2006 10:42 am

shameless bump, but i cant get it to work, its doing my head in and should be simple.

mdar
GamingTools Subscriber
Posts: 10
Joined: Fri Jul 09, 2004 12:34 pm

Post by mdar » Thu Aug 03, 2006 11:00 am

Couple of tools for you...

Code: Select all

commands
This shows a list of all available commands

Code: Select all

lstype
This shows information about the types available, and some information within them.


What I tried:

Code: Select all

echo ${Display.GetPixel[100,100]}
returned 330000

Having worked with Macroquest a bit, I tried:

Code: Select all

echo ${Display.GetPixel[100,100].Equal[330000]}
"No such rgb member Equal"

Ah, so we are working with an rgb type....

Code: Select all

lstype rgb
Members of type rgb: Red Green Blue Hex

Code: Select all

echo ${Display.GetPixel[100,100].Hex.Equal[330000]}
returned TRUE.


There you have it :)

Fuergrissa
GamingTools Subscriber
Posts: 31
Joined: Fri Jul 16, 2004 2:46 am

Post by Fuergrissa » Thu Aug 03, 2006 12:54 pm

thank you very much that works perfectly

Post Reply