Jump to content

PixelGetColor Help


Recommended Posts

1. If I want it to return pixel value can i write it like this

Func _getpixel($x)

_getpixel($x) = PixelGetColor(($x / 125 * 175 +16 ), 198)

EndFunc ;

2. Can I change the function value like this

Func _decision()

If PixelGetColor(788, 198) = 0xFF00FF Then

_decision() = 1

Else

_decision() = 0

EndIf

EndFunc

3. Is my londconfig() Function right?

Func loadconfig()

GUICtrlSetData($x[0], IniRead($myconfig_file, "x", "x0", "none"))

GUICtrlSetData($x[1], IniRead($myconfig_file, "x", "x1", "none"))

GUICtrlSetData($x[2], IniRead($myconfig_file, "x", "x2", "none"))

EndFunc

Link to comment
Share on other sites

Hi lufael,

if you've read the manual of AutoIt about functions, you should have seen that it utilizes the "Return" statement.

This applies to 1. and 2.

For 3. this can work if you have a global array of GUI objects. But we would need to see the whole code to tell you if it's right.

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...