Jump to content

Recommended Posts

Posted

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

Posted

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]

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
×
×
  • Create New...