I’m working on a screen reader and I need to get the word under the caret. After googling and also searching similar questions here, I found the only ways are either using OCR, or using autoit. I found how to get the word using autoit, but it needs the function GuiEdit.au3. In autoit I can do this by just using “include “, but how about c#. I added AutoItX3Lib to the references, but how about including the function?
In short: how to use pre-written autoit functions in c# after adding the AutoItX3Lib.dll?
Thanks for any help and let me know if anything is unclear. 🙂
You can try this .NET wrapper: http://www.autoitscript.com/forum/topic/39017-net-wrapper-project/
Or you can open the “Project->add reference” dialog in Visual Studio, and add a COM reference (click the COM tab) to AutoITX. You should then be able to use the DLL functions through P/Invoke or writing a managed wrapper. If you need guidance on using P/Invoke or writing a managed wrapper… It’s a bit tough, but if you’re motivated you can do it (I have), but it requires you to learn a bit of C++.
http://ondotnet.com/pub/a/dotnet/2004/03/29/mcpp_part3.html
http://msdn.microsoft.com/en-us/library/aa719104(v=vs.71).aspx