PantZ4 Posted March 18, 2007 Posted March 18, 2007 How do I make the function return a GUI window? Eg. My Function takes width and heigth and returns a GUI windiow _Function($GUIWidth,$GUIHeigth) But where does I place the return value? Thank you
SadBunny Posted March 18, 2007 Posted March 18, 2007 How do I make the function return a GUI window? Eg. My Function takes width and heigth and returns a GUI windiow _Function($GUIWidth,$GUIHeigth) But where does I place the return value? Thank you Not quite sure where the problem lies... This what you mean? #include <guiconstants.au3> $gui = Return_A_GUI(400,380) $ok = GUICtrlCreateButton("OK",10,10) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $ok Then Exit WEnd Exit Func Return_A_GUI($w,$h) $guiToReturn = GUICreate("test gui",$w,$h) Return $guiToReturn EndFunc Roses are FF0000, violets are 0000FF... All my base are belong to you.
PantZ4 Posted March 18, 2007 Author Posted March 18, 2007 Not quite sure where the problem lies... This what you mean? #include <guiconstants.au3> $gui = Return_A_GUI(400,380) $ok = GUICtrlCreateButton("OK",10,10) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $ok Then Exit WEnd Exit Func Return_A_GUI($w,$h) $guiToReturn = GUICreate("test gui",$w,$h) Return $guiToReturn EndFunc Thank you . (I'm just used to BJASS. Funtion(takes something, returns something)
SadBunny Posted March 18, 2007 Posted March 18, 2007 Thank you .(I'm just used to BJASS. Funtion(takes something, returns something)... Doesn't this function take something and return something too? Roses are FF0000, violets are 0000FF... All my base are belong to you.
PantZ4 Posted March 18, 2007 Author Posted March 18, 2007 (edited) ... Doesn't this function take something and return something too?Yes but in BJASS (Warcraft 3) you declare the vaule your function return, in the function name too.Example:_MyFunction(takes $GUIWidth, $GUIHeigth returns $GUIWindow) Edited March 18, 2007 by Mr. Zero
SadBunny Posted March 18, 2007 Posted March 18, 2007 Yes but in BJASS (Warcraft 3) you declare the vaule your function return, in the function name too.Quess I won't be learning to code WC3 functions anytime soon So anyway, problem solved now? Roses are FF0000, violets are 0000FF... All my base are belong to you.
PantZ4 Posted March 18, 2007 Author Posted March 18, 2007 Quess I won't be learning to code WC3 functions anytime soon So anyway, problem solved now?Yes thank you
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