Jump to content

Move variable from function to function


nusaki
 Share

Recommended Posts

Hey.

I have two functions. One of them is Func1() and second is Func2() I determined window’s handles in Func1(), is it possible to transfer these handles values to Func2() and how (or make them global form Func1())?

Edited by nusaki

keywen.com

Link to comment
Share on other sites

You could use a parameter with func 2, but I would rather just do Global $winhandle at the start of the script.

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Link to comment
Share on other sites

easy way:

Declare window’s handles as Global...

Global $handle

or simply declare it before Func1 and Func2

still an easy way:

pass window’s handles as parameter during call... it goes something like this:

Func Func1()
    ;determined window’s handles and return its value to $handle
    Func2($handle);call Func2 and pass $handle value
EndFunc

Func Func2($param1)
    MsgBox(0,"",$param1); $param1 = $handle
EndFunc

Hi ;)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...