Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Index into an AutoItObject?

$
0
0

I want to assign to an AutoItObject property without hardcoding the property name.

 

In Javascript it would look like:

obj['propertyName']=103;

I can read access a property using Execute:

Global $ppt_val=Execute('$obj.propertyName')

But I cannot assign with:

Assign('obj.propertyName',103,4); doesnt work, nor... Assign('$obj.propertyName',103,4)

Maybe AutoItObjects have a sooper-secret $obj.__set($name,$val) function?

I am looking for a workaround no matter how convoluted. Was thinking about maybe this might be feasible with a JScript COM helper, since I have built a AutoItObject ClassFactory anyhow. I would be able to create dynamic helper functions in JScript COM, that would stop me from writing:

Func Set__WinStyle($me,$name,$bool)   If False Then   ElseIf $name=='Border' Then     $me.Border=$bool   ElseIf $name=='Popup' Then     $me.Popup=$bool   ElseIf $name=='Caption' Then     $me.Caption=$bool ;etc,etc,etc

JScript COM:

http://www.autoitscript.com/forum/topic/141004-comobject-proxy-seamless-windows-script-control-autoitobj/

 


Viewing all articles
Browse latest Browse all 12506

Trending Articles