Search found 17 matches

by UppyDan
20 Feb 2017, 23:23
Forum: Ask For Help
Topic: ControlClick not working please help
Replies: 4
Views: 11767

Re: ControlClick not working please help

Try adding SetControlDelay -1 before the ControlClick line. This reduces the chance of interference by the user moving the mouse. Also, make sure the coordinates you use are relative to the window's upper-left corner. ControlClick only supports window coords, not screen or client coords. However, I ...
by UppyDan
20 Feb 2017, 22:58
Forum: Ask For Help
Topic: Firefox, WinWait, Wait for Window Topic is solved
Replies: 2
Views: 739

Re: Firefox, WinWait, Wait for Window Topic is solved

Code: Select all

WinWaitActive Save ahk_class #32770 ahk_exe firefox.exe
by UppyDan
05 Dec 2016, 14:19
Forum: Ask For Help
Topic: Making the Remote TreeView class work
Replies: 15
Views: 5421

Re: Making the Remote TreeView class work

I implemented a method for TVM_GETITEMRECT that can be added to the class (just cut and paste). I tested it on Windows 7, 64-bit, using Explorer's browser pane. GetRect(pItem, textAreaOnly := true) { WinGet ProcessId, pid, % "ahk_id " this.TVHnd hProcess := OpenProcess(PROCESS_VM_OPERATION|PROCESS_V...
by UppyDan
01 Jun 2016, 11:23
Forum: Scripts and Functions
Topic: Code for detecting mouse over close [X] button.
Replies: 0
Views: 889

Code for detecting mouse over close [X] button.

Since Vista introduced the aero style, the normal way to detect if the mouse is over a Windows close [X] button (using WM_NCHITTEST) doesn't work reliably. I wasn't able to Google any solutions for this, so I came up with the script below that works pretty well. Hope it helps someone. Regards, Dan ;...
by UppyDan
05 May 2015, 15:05
Forum: Ask For Help
Topic: Variant class needed?
Replies: 19
Views: 6418

Re: Variant class needed?

Good point on the VT_BOOL. That's probably why FindAll() was unhappy. I decided to keep varType in the parameter list even before using it for VT_BOOL, just so the signature matched the original method written by Jethro. That way folks could drop in the new function and not break any of their existi...
by UppyDan
04 May 2015, 19:47
Forum: Ask For Help
Topic: Variant class needed?
Replies: 19
Views: 6418

Re: Variant class needed?

I finally had time to experiment with this again and incorporated Lexikos's suggestion into a new version of the CreatePropertyCondition() functions. However, VT_BOOL types unexpectedly caused an exception when the returned condition variable was used by IUIAutomationElement::FindFirst(). The proble...
by UppyDan
29 Apr 2015, 16:40
Forum: Ask For Help
Topic: Variant class needed?
Replies: 19
Views: 6418

Re: Variant class needed?

Elgin wrote:Have the kindness to fix the typo in my nick, please ;-)
Oops. Good catch. Sorry about that, my fingers sometimes decide what to do all on their own. :D
by UppyDan
29 Apr 2015, 13:52
Forum: Ask For Help
Topic: Variant class needed?
Replies: 19
Views: 6418

Re: Variant class needed? (Fix for CreatePropertyCondition()

In case it helps someone else, I'm posting my implementations of the UIA_Interace CreatePropertyCondition() and CreatePropertyConditionEx() methods. They incorporate Elgin's solution for the exception caused in 32-bit builds. (I took a guess on the CreatePropertyConditionEx() code, but it seems to b...
by UppyDan
28 Apr 2015, 17:49
Forum: Ask For Help
Topic: Variant class needed?
Replies: 19
Views: 6418

Re: Variant class needed?

Thanks Elgin! It seems to work for me as well. Very interesting, however. Not only did you change the variant's parameter type, but the DllCall() for 32-bit scripts actually has more parameters. Did you have to dig through the Microsoft SDK header files to figure that out?
by UppyDan
26 Apr 2015, 23:35
Forum: Ask For Help
Topic: Variant class needed?
Replies: 19
Views: 6418

Re: Variant class needed?

I have been looking at IUIAutomation code written by Jethro and Nepter a few years back ... Note that a lack of understanding on my part around variants & memory was one reason I put this project on hold - and at this point it's unlikely I'll finish the library. You're not alone understanding varia...
by UppyDan
25 Apr 2015, 18:06
Forum: Ask For Help
Topic: Variant class needed?
Replies: 19
Views: 6418

Re: Variant class needed?

Thanks Lexikos, your example is working great. However, is any memory clean up required for the data that is assigned to the variant? (i.e. Should I use the Win32 VariantClear() function after the variant is no longer needed, and pass it &variant_ref[] ?)
by UppyDan
03 Apr 2015, 19:14
Forum: Ask For Help
Topic: Variant class needed?
Replies: 19
Views: 6418

Variant class needed?

I have been looking at IUIAutomation code written by Jethro and Nepter a few years back, and noticed custom functions in those files for handling COM object variants. I am considering creating a variant class that contains methods like Create(), GetValue(), GetType(), but can't believe this hasn't b...
by UppyDan
07 May 2014, 10:56
Forum: Ask For Help
Topic: What does an array subscript with an asterisk in it mean?
Replies: 4
Views: 1819

Re: What does an array subscript with an asterisk in it mean

Yeah, it will take me some time to learn the full power of this syntax. Being a long time C++ programmer, I understand how the params* syntax works in a function declaration. But I never had the ability to pack things into a single variable like this.
by UppyDan
06 May 2014, 13:49
Forum: Ask For Help
Topic: MsgBox in OnExit subroutine not appearing if ALT+F4 used.
Replies: 2
Views: 1128

Re: MsgBox in OnExit subroutine not appearing if ALT+F4 used

why not just let them all fall thru to the exitsub Hey, that works! I had to remove the OnExit statement to prevent the cleanup logic from running twice, but I like that solution. It's so simple! As a side note for others, after removing OnExit, the ExitSub logic does NOT get called if the script i...
by UppyDan
05 May 2014, 22:10
Forum: Ask For Help
Topic: MsgBox in OnExit subroutine not appearing if ALT+F4 used.
Replies: 2
Views: 1128

MsgBox in OnExit subroutine not appearing if ALT+F4 used.

I'm using the OnExit subroutine to prompt the user to save changes (or not) before my script exits. This works fine unless I use ALT+F4 or click the window's [X] button. Either of those causes the message box to be hidden. (It executes and reacts to key presses. You just can't see it.) The cause has...
by UppyDan
05 May 2014, 16:30
Forum: Ask For Help
Topic: What does an array subscript with an asterisk in it mean?
Replies: 4
Views: 1819

Re: What does an array subscript with an asterisk in it mean

Ah ha. Thanks for the response HotKeyIt, and fast too! So it's basically a way to shorten subscript syntax. That will help me understand sample code that uses it. :)
by UppyDan
05 May 2014, 16:05
Forum: Ask For Help
Topic: What does an array subscript with an asterisk in it mean?
Replies: 4
Views: 1819

What does an array subscript with an asterisk in it mean?

The following feature is from the AHK change log for 1.1.12.00, and I need help understanding what it means ... "Object properties can now be set using variadic syntax, as in x[y*]:=z, where y contains an array of keys/indices or parameters." Here is my test script ... a := [2, 4, 11] b := [] b[a*] ...

Go to advanced search