Jump to content

Create Object Handling


Go to solution Solved by mike1950r,

Recommended Posts

Hello,

I'm using an object in different functions.

The object is created with:

$objVideo = ObjCreate("wmplayer.ocx")

Now I want to use this object in another function and tried:

$objVideo = ObjGet("wmplayer.ocx")

But this is not working.

How can I use the same object in different function without giving the object variable as parameter in function name such as:

Func NextFunction($objVideo)

Thanks for assistance.

Cheers mike

Link to comment
Share on other sites

If it's an "include" library you can also define the Global variable at the top of the include file itself.

GDIPlus.au3 does something similar with $__g_hGDIPDll.

Aalso you could test the variable with isobj() at the beginning of the single functions, and throw an error when false.

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...