niommaryland.blogg.se

Getwindowtext
Getwindowtext




getwindowtext

The below is what I have so far that I've pulled from other sources. TL DR - With C# EnumWindows I've been able to print the window handles of all top-level windows to the console, but can't figure out how to properly implement a check for window title, and only print window handles that meet the window title string criteria.

getwindowtext

So I haven't been able to figure out how to iterate through all of the windows with a button click using the above method. However, with respect to the actual windows I would like to grab (poker tables), they don't appear under processes (only the poker client does). So far I've been able to do this using GetProcessesByName() with things like notepad. So I'm really just trying to figure out how to iterate through all top-level windows that share a common window title, and store the handle + coords for use later on. I feel like to achieve the above in C#, it would likely be best to have a 'save layout' button, whereby after placing the tables on the screen where I would like to create the slots, I grab the coords of each table, and save for future use. So with the AHK script running, and when I hit the appropriate hotkey while hovering over a table, that table will then be moved to one of the open slots. The script allowed me to place multiple tables on the screen, and record the coords of each table position, then use those coords to create 'slots' for future use. Basically, what I'm hoping to do is replace the AHK script I use while playing. I'm ultimately trying to create a sort of layout manager for use with online poker. Just a few quick notes on what I'm trying to achieve. The rest is basically me just wondering if I'm going about accomplishing my goal the best way, or if any of you fine individuals know of a better way to do it. For anyone just looking for the question, it's in the TLDR and code at the bottom.






Getwindowtext