cppman Posted February 18, 2006 Posted February 18, 2006 Okay, i've been wondering how you would get a function to return its value to a variabel specified by the user... Like: here is my UDF Func SpriteCreate($Image, $Width, $Height, $StartX, $StartY) GUICtrlCreatePic($Image, $StartX, $StartY, $Width, $Height) EndFunc I would want the user to be able to do: $SpriteBox = SpriteCreate($Image, $Width, $Height, $StartX, $StartY) so $SpriteBox would be the variable for GUICtrlCreatePic... sorry, it is kind of hard for me to explain. any ideas people? Miva OS Project
GaryFrost Posted February 18, 2006 Posted February 18, 2006 (edited) you mean something like? Func SpriteCreate($Image, $Width, $Height, $StartX, $StartY) Local $controlID $controlID = GUICtrlCreatePic($Image, $StartX, $StartY, $Width, $Height) If $controlID Then Return $controlID Else SetError(1) Return 0 EndIf EndFunc Edited February 18, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
cppman Posted February 18, 2006 Author Posted February 18, 2006 yeah, i think that is what im looking for. thanks! Miva OS Project
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