|
-
Aug 21st, 2006, 04:16 PM
#1
Thread Starter
Addicted Member
Little task with hooking/subclassing
I'll code it myself because i have experience of coding in vb but i left vb in 2003 or 2002 so lot of things are forgotten.
So please help me now. 
There is a small software installed on my pc for which i have no support now.It has some errors so it ask for debugging when it gets error while executing and if i click NO then it keeps on working.
It is really a headache for me to click NO various times in a day.
I want to write small vb program so that it can check this application's message box and click NO so that i can avoid this annoying situation.
Is it possible ? ( i think yes thru hooking or subcalssing which i have forgotten now).
Please help me about solving this problem
Thanks a lot for you coming help.
-
Aug 21st, 2006, 04:25 PM
#2
Re: Little task with hooking/subclassing
Perhars you can find something in this thread by rm_03.
-
Aug 21st, 2006, 05:01 PM
#3
Thread Starter
Addicted Member
Re: Little task with hooking/subclassing
I need little more help 
Now i know i want to hook message box which appears randomly.
but one problem that application changes their caption constantly.
so how i would give value to
Const ParentCaption variable ?
another helpful thread http://vbforums.com/showthread.php?t=322261
yes i need little more help.
-
Aug 21st, 2006, 05:20 PM
#4
Re: Little task with hooking/subclassing
Const ParentCaption variable? Const and variable? That's a bit confusing Clarify.
-
Aug 21st, 2006, 05:31 PM
#5
Re: Little task with hooking/subclassing
slice,
I don't think you want to do any hooking.
I have run into this situation a few times and what I do is this:
1. In a loop or timer use findWindow to see when the message box is on the screen
2. use FindWindowEx to get the handle of the "No" button
3. Use sendMessage to send a click to the "No" button
-
Aug 21st, 2006, 06:15 PM
#6
Hyperactive Member
Re: Little task with hooking/subclassing
There is a freeware scripting langauge called AutoIt that can pull this off with a 3 line script, no API declarations needed, that will compile to exe
-
Aug 21st, 2006, 06:35 PM
#7
Hyperactive Member
Re: Little task with hooking/subclassing
way to go, triggernum. lead people away from vb..*sarcasm*
-
Aug 21st, 2006, 06:48 PM
#8
Hyperactive Member
Re: Little task with hooking/subclassing
Use any tactic that works, and take the path of least resistance, [Paste overused metaphor here].. AutoIt drastically simplifies most of what I see ppl looking to subclass controls in other apps seeking..
Don't get me wrong, a real programming language is far more diverse, but with that diversity comes complexity..
Maybe I can save face by mentioning that you can have the best of both worlds by using AutoIt's activex dll in VB etc?..
-
Aug 21st, 2006, 06:55 PM
#9
Hyperactive Member
Re: Little task with hooking/subclassing
well that works :P
if they can make machine code and asm* both work in vb, im sure the scripting could be a nice addition as well.
*(asm via 3rd party addin)
-
Aug 21st, 2006, 07:02 PM
#10
Hyperactive Member
Re: Little task with hooking/subclassing
Love the Inline ASM! Takes me back to QBasic..
If anybody is curious, http://www.persistentrealities.com/v...0&item=5&t=asm
-
Aug 22nd, 2006, 11:57 AM
#11
Thread Starter
Addicted Member
Re: Little task with hooking/subclassing
 Originally Posted by moeur
slice,
I don't think you want to do any hooking.
I have run into this situation a few times and what I do is this:
1. In a loop or timer use findWindow to see when the message box is on the screen
2. use FindWindowEx to get the handle of the "No" button
3. Use sendMessage to send a click to the "No" button
If you have already run into this situation then i am lucky 
could you please post some code ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|