« first day (173 days earlier)      last day (1366 days later) » 

1:26 PM
@Zoe
You use VS Code?
 
Zoe
Kinda sorta
Tried it before, didn't like it
 
I do, but just for some limited purposes
 
I can't find Spy++
 
Mainly because it has a portable variant, with the MS SQL extension
 
I need a program which will help me identify a window
not a window sorry
but a text box within a window
Apparently this can be done with Spy++
I have VS Studio and pointless work install of VS Shell
I did have Community 2017 but think I deleted as massive.
 
1:31 PM
Yeah, I have put in quite a bit of effort to move VS Community from my SSD to my cold storage HDD
You can use this though: stackoverflow.com/a/51241241/7296893 iterates over all child windows (including controls) from VBA
I sometimes use it instead of Spy++
 
Oooh
So that finds windows but text boxes within? It is the filepath input box for the Save As in Windows Explorer I am trying to target
I have the handle of the Save As Window
I think!
 
It finds anything that has a hWnd, which include most text boxes
It's easy for prototyping code, you can put in watches, breakpoints, etc.. Then later on you can try and create more optimized code
 
How would I know which is the text box?
 
It prints the class name, and you can try modifying it and stuff
 
Zoe
@ErikvonAsmuth imho, it looks like a heavy notepad++
 
1:46 PM
@Zoe Yeah but the integrated extension store is nice, and there are some good extensions in there
And it's more fancy!
(I think that last one is the main reason I really use it)
And the settings menu is just a JSON file, so it makes me feel extra geeky
 
Ok... so I can give that a rock and roll. I am not sure how I validate the class name unless it is descriptive.
 
If something should be in that control, you can use SENDMESSAGE to try to get it out
And that code displays how the windows are nested, combine nesting with class name and it's usually easy
 
?
I am trying to use SendMessageByString to send info. There is default text in the control
 
2:02 PM
Yeah, but you can enter some, and then receive it back to verify it's there
 
Good point!
 
 
1 hour later…
3:12 PM
@ErikvonAsmuth Where is the sub IterateChildWindows ?
 
3:26 PM
Oh, that should just be IterateAllWindows, stupid me renamed the function because I had modified it to serve two purposes, but didn't do it properly
I've adjusted it in the answer now and tested it. You can just copy-paste it to a new module and run it, shouldn't need further adjusting
 
 
1 hour later…
4:44 PM
 
5:15 PM
@ErikvonAsmuth Thanks. Will have a go now.
+ for that great answer btw. So, I get the following:
3738116:Save As(#32770)
-3344082:(DUIViewWndClassName)
--1443528:(DirectUIHWND)
---3346054:(FloatNotifySink)
----1838618:(ComboBox)
-----4787434:(Edit)
---4915576:(CtrlNotifySink)
----2228368:Namespace Tree Control(NamespaceTreeControl)
-----2490498:Namespace Tree Control(Static)
-----3740592:Tree View(SysTreeView32)
---1904818:(CtrlNotifySink)
----1509026:ShellView(SHELLDLL_DefView)
-----1771134:(DirectUIHWND)
------5506552:(CtrlNotifySink)
-------2688482:(ScrollBar)
------6555286:(CtrlNotifySink)
So, I am thinking 4787434 ?
 
 
3 hours later…
8:14 PM
@ErikvonAsmuth So, I am finding all the right window handles to then SendMessageByString to the combobox that needs to receive the input but I don't see the text change. The window in fact closes and the code terminates. No error message and doesn't stop at the STOP keyword. I am guessing something is wrong in the declarations? Or somehow a handle isn't closed properly?
 
8:29 PM
Hummmmmmmmmmmm...got it to work...
Silly mistake
 
8:43 PM
Doesn't work if I use the classname and title arguments found with spy++
Your code has no problem listing all the windows.
Aghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
:sighs:
 

« first day (173 days earlier)      last day (1366 days later) »