views:

20

answers:

0

Hi,

I'm trying to add a feature in a winforms vb.net application i'm writing that would listen to global keyboard input for specefic user entered strings and replace them with another string (all done while the user is typing). In other words, i'm trying to achieve something similar to the autohotkey command:

::tyvm::Thank you very much

Unfortunately, i'm finding it difficult to do so and require help.

Keypreview/keyup/keydown are application local and read one character at a time.

I'd prefer to have a solution that is integrated with my application, but I have also considered deploying AutoHotKey with my application. That way I can generate the script from within my application and then use process.start(...) to launch it. In researching this option I found ironAHK but didn't know how to implement it with my application.

I also thought of generating a vbscript that would do the same. That way I don't have to deploy anything with my application as vbscript will run on windows natively. however, I don't know how to achieve that functionality using vbscript nor could I find a code snippet that would help out.

I've also googled for other solutions / code snippets but couldn't find any.

Is there a solution that I am not aware of? any ideas on how can i implement such feature. I really need help and ideas on how to proceed.

Many thanks for all your help.