Yes - trying to update for V2.
Search found 233 matches
- 22 Feb 2021, 20:25
- Forum: Ask For Help
- Topic: Doesn't this class create a dangling pointer? Topic is solved
- Replies: 2
- Views: 83
- 22 Feb 2021, 17:55
- Forum: Ask For Help
- Topic: Doesn't this class create a dangling pointer? Topic is solved
- Replies: 2
- Views: 83
Doesn't this class create a dangling pointer? Topic is solved
/* I'm trying to update Elgin's TypeLib2AHK https://www.autohotkey.com/boards/viewtopic.php?f=6&t=36025 Amazing piece of code for someone like me needing to learn about UIAutomation. Wondering if this class constructor can result in a dangling pointer? I failed to figure out how I can test for that...
- 17 Jan 2021, 16:41
- Forum: AutoHotkey v2 Help
- Topic: Why does param expression increment ref count by 2?
- Replies: 5
- Views: 163
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...
- 15 Jan 2021, 07:32
- Forum: AutoHotkey v2 Help
- Topic: Why does param expression increment ref count by 2?
- Replies: 5
- Views: 163
Re: Why does param expression increment ref count by 2?
I think
Why does passing as a parameter increment ref count by 2?
was the wrong term.param expression
Why does passing
Code: Select all
x.__Value
- 14 Jan 2021, 18:01
- Forum: AutoHotkey v2 Help
- Topic: Why does param expression increment ref count by 2?
- Replies: 5
- Views: 163
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 } } ...
- 14 Jan 2021, 17:14
- Forum: AutoHotkey v2 Help
- Topic: Why does param expression increment ref count by 2?
- Replies: 5
- Views: 163
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 ) ;...
- 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: 253
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...
- 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: 253
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 ...
- 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: 253
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...
- 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: 253
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?
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?
- 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: 253
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...
- 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: 253
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 ...
- 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: 253
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...
- 23 Aug 2020, 13:14
- Forum: AutoHotkey v2 Help
- Topic: [a122] ComObjValue() and ComCall() Topic is solved
- Replies: 3
- Views: 1222
Re: [a122] ComObjValue() and ComCall() Topic is solved
Here's my more detailed explanation for any other newbies like me
- 23 Aug 2020, 09:18
- Forum: AutoHotkey v2 Help
- Topic: [a122] ComObjValue() and ComCall() Topic is solved
- Replies: 3
- Views: 1222
Re: [a122] ComObjValue() and ComCall() Topic is solved
Thanks - very helpful
- 22 Aug 2020, 22:50
- Forum: Ask For Help
- Topic: autoclicker control
- Replies: 2
- Views: 248
- 22 Aug 2020, 21:51
- Forum: AutoHotkey v2 Help
- Topic: [a122] ComObjValue() and ComCall() Topic is solved
- Replies: 3
- Views: 1222
[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...
- 16 Aug 2020, 12:46
- Forum: Bug Reports
- Topic: [a118] assigning integer properties Topic is solved
- Replies: 5
- Views: 2222
- 15 Aug 2020, 20:23
- Forum: Bug Reports
- Topic: [a118] assigning integer properties Topic is solved
- Replies: 5
- Views: 2222
Re: [a118] assigning integer properties Topic is solved
Thanks: much appreciate that you tracked down the code change too.
- 08 Aug 2020, 09:57
- Forum: Ask For Help
- Topic: Get members of COM object like in PowerShell Topic is solved
- Replies: 1
- Views: 691
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...