lufael Posted May 4, 2012 Share Posted May 4, 2012 1. If I want it to return pixel value can i write it like thisFunc _getpixel($x)_getpixel($x) = PixelGetColor(($x / 125 * 175 +16 ), 198)EndFunc ;2. Can I change the function value like thisFunc _decision()If PixelGetColor(788, 198) = 0xFF00FF Then_decision() = 1Else_decision() = 0EndIfEndFunc3. 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 More sharing options...
hannes08 Posted May 4, 2012 Share Posted May 4, 2012 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 More sharing options...
lufael Posted May 5, 2012 Author Share Posted May 5, 2012 Thank you very much guy. Now I can figure it out It's just my school project. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now