Leave these fields empty (spam trap):
You can leave this blank to post anonymously, or you can create a Tripcode by using the format Name#Password
[i]Italic Text[/i]
[b]Bold Text[/b]
[spoiler]Spoiler Text[/spoiler]
>Highlight/Quote Text
[pre]Preformatted & Monospace Text[/pre]
[super]Superset Text[/super]
[sub]Subset Text[/sub]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists


Excel automation

- Sun, 30 Apr 2017 03:17:57 EST sjT5DuRU No.36782
File: 1493536677095.png -(114258B / 111.58KB, 1444x906) Thumbnail displayed, click image for full size. Excel automation
Hi, I'm experimenting with automation in Excel/VBA, I'm trying to click on the "use another account" element but Spy++ and FindWindowEx can't locate it, but HP UFT can. UFT reads that it has the same HWND as the parent. Can any provide a solution to this?

tl;dr: how to use WinAPI to locate a static element that doesn't have a HWND?
Graham Brirrystone - Sun, 30 Apr 2017 03:33:47 EST rAGFRmkY No.36784 Reply
I THink ur running a 32bit api spy in a 64 bit environment my frieeeend lol
Isabella Broppershit - Sun, 30 Apr 2017 03:40:16 EST sjT5DuRU No.36787 Reply
I'm making a tool that connects to a test environment automatically, unfortunately I can't use the shell command to connect due to restraints on storing credentials.
Ernest Demblepuck - Sun, 30 Apr 2017 05:41:08 EST P6PS9CBz No.36788 Reply
There's a few possibilities here.

One is that since this is a Windows Security dialog that your process that is calling FindWindowEx does not have the proper permissions to access that element. This may be resolved by running your program "as administrator".

Alternatively that static element may not be a control at all - it could possibly be just code owned by the parent window that handles mouse-over, mouse-click, and display capabilities for that element. This would explain why HP UFT considers it to have the same HWND as the parent (because it is the same HWND as the parent).
Isabella Broppershit - Sun, 30 Apr 2017 06:15:12 EST sjT5DuRU No.36789 Reply
so how is UFT detecting it, and can I use that same method?
I was thinking to just click the X, Y that would match with the element.
Graham Brirrystone - Sun, 30 Apr 2017 07:39:39 EST rAGFRmkY No.36792 Reply
The only case where HWND would be differnt would be if ur lookin at a MDI Form. Admin privs have nothing to do with it what version of win are u ha.. i mean testing . - Gary the snail.
Fanny Murdwell - Sun, 30 Apr 2017 08:20:46 EST b2Dm/aZr No.36797 Reply
Automating a GUI security prompt using VBA, huh? Do you have plans to make this a hat trick?
Graham Brirrystone - Sun, 30 Apr 2017 14:57:32 EST rAGFRmkY No.36811 Reply
U sure u didn't mean VB6 i mean why VBA? So Limited!!! .NET Even??

Report Post
Please be descriptive with report notes,
this helps staff resolve issues quicker.