Jump to content
Sign in to follow this  

Really basic help...

Recommended Posts

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)


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?

Share this post

Link to post
Share on other sites

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
        Return 0
Edited 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.


Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...