quote:
Originally posted by DJeX
I tryed your module but it didn't work.
I tryed the code you posted and that aswell did not work.
They both work perfect if you follow the instructions though.
eg: for the module, did you tried it out with an
unpatched english MSN Messenger version
6.x while the main window was
not minimized to the system tray, as stated in the first comment in that module and in my post? It will not work on Messenger 7 or whatever as the controls there are build up in another way (without windows)...
quote:
Originally posted by DJeX
This is what I did:
I made a test program called Notepad with a button called Test on it. I replaced the correct words in the code above (PROJECT and VIEW CODE) with NOTEPAD and TEST. Then I ran my test program then run the code above but still didn't work.
First of all, everything is made specifically for a certain situation; The code in the form doesn't work for everything.
Nevertheless, this time the blame was on my part. Though, you could've found where it went wrong if you'd understand what the code does (instead of simply copy/pasting).
Both lines with
GetWindowText CurHwnd, T, Length
must be
GetWindowText CurHwnd, T, Length + 1
and you should have replaced the obsolete
GetWindowWord() API with
GetWindowLong(), as stated in the comments...
I've done both edits in the source for you now... Sorry about the misleading.
quote:
Originally posted by DJeX
I just need a simple code that will find a button on another program that is running and press it. Like for example how that Hit Man Pro anti-spyware program works, it controls the other programs that it downloads.
The code shown is exactly what you want. Nobody can give you anything more specific if you aren't specific.
If you understand how the method works, you'll see that you can not make something general, working for everything in every situation as each situation is totally different. Even the code in Hitman Pro is specifically made for specific programs.
The big key here is to understand
every line of code and understand what
every API call
exactly does. The MSDN Library can help you in that (http://www.msdn.com/).
-
To further help you and as asked in my previous post, be specific of what you want (and I mean
really specific with all the small details and stuff)...