2

I am trying to simulate some clicking on a flash control on a window belonging to another executable using the AutoIT COM Object.

Since it is a long-running script I'd like to keep the system usable by normal (read: physical) means meanwhile. I first taught of a virtual machine, then I remembered that WndProc hooking exists.

Now I'd like to simulate clicks with fake WM_* messages instead of using AutoIt because it hijacks the mouse, in order to be able to run the automation in background without the mouse moving by itself and my current active window (i.e. notepad) losing focus.

My problem is that I have no idea on how to achieve the WndProc hooking in Vb.Net. People says a Dll injection is needed but in my previous Realbasic experience I did it in plain win api. (To write messages I don't know, but to read worked.)

Ps. I've checked and no similar question seems to address this (at least in vb.net).

beppe9000
  • 1,056
  • 1
  • 13
  • 28
  • "WndProc hooking" requires injecting a DLL into the target process. You cannot accomplish that with VB.NET. It is not the right approach anyway, that doesn't let you generate messages. Like PostMessage() does. Use a decent UI Automation library. – Hans Passant Nov 28 '14 at 15:52
  • would that steal focus from other windows? can you raccomend one? Ps. in realbasic I did this and no Dll injection was needeed... – beppe9000 Nov 28 '14 at 15:55
  • No. Use Google for recommendations. The obvious query is "vb.net ui automation library". – Hans Passant Nov 28 '14 at 15:58
  • I've checked the Microsoft UI Automation. It seems to only support testing my own application. I need to automate a browser window, not clicking my buttons. I believe that any "Ui Automation Library" would do this. – beppe9000 Nov 28 '14 at 16:09

0 Answers0