Sign in to follow this  
Followers 0
Zohar

[Solved] How to Display the Handle(As a Number) That I Get From ObjCreate()?

9 posts in this topic

#1 ·  Posted (edited)

Hi

 

If I create a variable that contains a handle, for example to a Window, then I can successfully dislpay it with a MsgBox.

Like this for example:

Local   $H  =WinGetHandle("")
MsgBox(0,"",$H)

 It works, and I get a MsgBox with "0x000605A8".

 

But If I create a variable that contains a handle that was created with ObjCreate(),

then trying to display it, gives an empty MsgBox, and not some Hex number like before..

 

Please note that the variable does contain an object, because I can run methods from this object..

Like, doing $V.SomeMethod(param1,param2) works great.

So the variable does contain an object..

So why can't I display its handle?

 

Thank you

Edited by Zohar

Share this post


Link to post
Share on other sites



Because it's object type.

If you need pointer representation then use Ptr() on it.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Hi trancexx

I tried it, and what I got now instead of an empty MsgBox, is a MsgBox with "0x00000000"..

Share this post


Link to post
Share on other sites

And what version of AutoIt you run?


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

3.3.6.1

It is a bug that was fixed?
 

Edited by Zohar

Share this post


Link to post
Share on other sites

Yes, something like that. I'd have to check logs to say when exactly, but newer versions would get you pointer.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I get it..

OK Thank you very much..

 

For the meantime, while I use this AutoIt Version, Is there a way for me to check if the Variable does contain an object?

Edited by Zohar

Share this post


Link to post
Share on other sites

Thank you JohnOne

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  
Followers 0