Search found 231 matches

by SAbboushi
17 Jan 2021, 16:41
Forum: AutoHotkey v2 Help
Topic: Why does param expression increment ref count by 2?
Replies: 4
Views: 93

Re: Why does param expression increment ref count by 2?

Thanks. Seems I'm still missing something... One reference for the expression I understand this to mean that the expression x.__Value creates a temporary reference which increments refcount by 1. But isn't this temporary reference the parameter that is passed? Since the param is passed byref , I sti...
by SAbboushi
15 Jan 2021, 07:32
Forum: AutoHotkey v2 Help
Topic: Why does param expression increment ref count by 2?
Replies: 4
Views: 93

Re: Why does param expression increment ref count by 2?

I think
param expression
was the wrong term.

Why does passing

Code: Select all

x.__Value
as a parameter increment ref count by 2?
by SAbboushi
14 Jan 2021, 18:01
Forum: AutoHotkey v2 Help
Topic: Why does param expression increment ref count by 2?
Replies: 4
Views: 93

Re: Why does param expression increment ref count by 2?

oops - this script includes ObjectReferenceCount(): #SingleInstance COMobj:=ComObjCreate("{FF48DBA4-60EF-4201-AA87-54103EEF594E}","{30CBE57D-D9D0-452A-AB13-7AC5AC4825EE}") COMobjRefCount1 := ObjectReferenceCount( COMobj ) ; 1 x:= test1.new(COMobj) class test1 { __New(p) { return this.__Value:=p } } ...
by SAbboushi
14 Jan 2021, 17:14
Forum: AutoHotkey v2 Help
Topic: Why does param expression increment ref count by 2?
Replies: 4
Views: 93

Why does param expression increment ref count by 2?

#SingleInstance COMobj:=ComObjCreate("{FF48DBA4-60EF-4201-AA87-54103EEF594E}","{30CBE57D-D9D0-452A-AB13-7AC5AC4825EE}") COMobjRefCount1 := ObjectReferenceCount( COMobj ) ; 1 x:= test1.new(COMobj) class test1 { __New(p) { return this.__Value:=p } } COMobjRefCount2 := ObjectReferenceCount( COMobj ) ;...
by SAbboushi
10 Jan 2021, 17:02
Forum: Ask For Help
Topic: UIAutomation: why is interface pointer needed after function address is known? Topic is solved
Replies: 12
Views: 239

Re: UIAutomation: why is interface pointer needed after function address is known? Topic is solved

HotKeyIt : thanks for chiming in. I'm not seeing how these scripts relate to my question. Maybe you can clarify after reading my response. It seems to me that this relates more to how AHK implements classes/instances. By default, I believe a user-defined class does not have a base. Since your class...
by SAbboushi
10 Jan 2021, 14:01
Forum: Ask For Help
Topic: UIAutomation: why is interface pointer needed after function address is known? Topic is solved
Replies: 12
Views: 239

Re: UIAutomation: why is interface pointer needed after function address is known? Topic is solved

Thanks again for all your help - I appreciate the effort and time spent. The closest answer I've found so far is @maul.esel's [advanced] Using raw COM interfaces in AHK : HrInit() has no parameters. But why are we passing the ptr parameter then? Remember: ptr is the pointer to the instance. We must ...
by SAbboushi
10 Jan 2021, 09:59
Forum: Ask For Help
Topic: UIAutomation: why is interface pointer needed after function address is known? Topic is solved
Replies: 12
Views: 239

Re: UIAutomation: why is interface pointer needed after function address is known? Topic is solved

How about if I put it this way: I see a similarity between getting a reference to a function using Func() and getting a reference to a function using an interface pointer. Once I have the address of the function, the FunctionName (which is what Func() used to determine the function address) is not n...
by SAbboushi
08 Jan 2021, 21:17
Forum: Ask For Help
Topic: UIAutomation: why is interface pointer needed after function address is known? Topic is solved
Replies: 12
Views: 239

Re: UIAutomation: why is interface pointer needed after function address is known? Topic is solved

>> the function wouldn't know the interface pointer if you didn't pass it
I agree. My question is why the interface pointer is needed by the function: I'm passing hwnd to the function, so of what use is the interface pointer to the function?
by SAbboushi
08 Jan 2021, 15:33
Forum: Ask For Help
Topic: UIAutomation: why is interface pointer needed after function address is known? Topic is solved
Replies: 12
Views: 239

Re: UIAutomation: why is interface pointer needed after function address is known? Topic is solved

>> “hang” additional stuff onto that vtable I understand that to be referring to the additional function pointers in the vtable that (as you've said) can be referenced by using "offsets relative to the interface pointer" Per my post, IUIAutomation pointer was used to get vtable pointer to ElementFro...
by SAbboushi
08 Jan 2021, 13:13
Forum: Ask For Help
Topic: UIAutomation: why is interface pointer needed after function address is known? Topic is solved
Replies: 12
Views: 239

Re: UIAutomation: why is interface pointer needed after function address is known? Topic is solved

Thanks for your response. I've already studied that post as well as the follow-up (adjustor thunks) a couple months ago -- and although I find Raymond's posts to be very helpful, I don't find that this one helps me understand the answer to my question... If you believe I'm missing something, please ...
by SAbboushi
08 Jan 2021, 09:43
Forum: Ask For Help
Topic: UIAutomation: why is interface pointer needed after function address is known? Topic is solved
Replies: 12
Views: 239

UIAutomation: why is interface pointer needed after function address is known? Topic is solved

I've been on the journey of trying to learn how to use Windows UI Automation with AHK (which for me means learning about COM, DllCall() and C++ -- and the deeper I go down that "rabbit hole", the more in absolute awe I am at the wizardry of Lexikos and those who have built/maintain AHK, especially V...
by SAbboushi
22 Aug 2020, 22:50
Forum: Ask For Help
Topic: autoclicker control
Replies: 2
Views: 244

Re: autoclicker control

See #MaxThreadsperHotkey

Try adding #MaxThreadsperHotkey 2 at the top of your script.
by SAbboushi
22 Aug 2020, 21:51
Forum: AutoHotkey v2 Help
Topic: [a122] ComObjValue() and ComCall() Topic is solved
Replies: 3
Views: 1214

[a122] ComObjValue() and ComCall() Topic is solved

Wondering why an exception is thrown when I uncomment out the ComObjValue() statement? The pointer value can be passed directly or encapsulated within an object with the Ptr property, such as a ComObj with variant type VT_UNKNOWN. I'm trying to pass the pointer value directly (not working). When enc...
by SAbboushi
15 Aug 2020, 20:23
Forum: Bug Reports
Topic: [a118] assigning integer properties
Replies: 4
Views: 2187

Re: [a118] assigning integer properties

Thanks: much appreciate that you tracked down the code change too.
by SAbboushi
08 Aug 2020, 09:57
Forum: Ask For Help
Topic: Get members of COM object like in PowerShell Topic is solved
Replies: 1
Views: 689

Get members of COM object like in PowerShell Topic is solved

Per this article , PowerShell exposes the Get-Member cmdlet that can be used to list methods and properties on an object easily Object Members Is there a way to do this in AHK once I have an interface pointer? Background in case you can suggest helpful resources: Right now, I'm trying to get more f...
by SAbboushi
06 Aug 2020, 14:54
Forum: Bug Reports
Topic: [a118] assigning integer properties
Replies: 4
Views: 2187

[a118] assigning integer properties

1..2 or 1.0.2 is the number 1.0 followed by the property 2... obj1.DefineProp( 1, {value: 12}) ; this work I've scoured through the documentation, v2-changes and alpha (UPDATES) but not finding why error is thrown when I try to set an integer property name like this: obj1a := { 1: 12 } ; Invalid pr...

Go to advanced search