Jump to content
Sign in to follow this  
PandiPanda

msdn and Structure/Constructor

Recommended Posts

PandiPanda

Hi guys,

Can i do something like that in autoit ?

msdn Point

$hPoint = ObjCreate("System.Windows.point") 
$Point_1 = $hPoint.Point(1.2,1.1) ; call Constructor, can i ?
$Point_2 = $hPoint.Point(1.1,4.5)
Local $x = $Point_1.X ; so there $x = 1.2
Local $isEquals=$Point_1.Equals($Point_2) ; there false

Thanks.

Edited by PandiPanda

Share this post


Link to post
Share on other sites
JohnOne

No, that seems to be .net type which autoit has no access to.

However you can include StuctureConstants.au3 and use $tagPOINT

Which ends up something like.

Global Const $tagPOINT = "struct;long X;long Y;endstruct"
$MyPoint = DllStructCreate($tagPOINT)
$x = $MyPoint[1]
$y = $MyPoint[2]

That's only if you need a point for use with external dll.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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  

×