dukeofmuffins Posted August 28, 2010 Share Posted August 28, 2010 Has anyone incorporated the AutoItX dll into a VB.net project? Specifically with Visual Studio 2010? I have poured over all manner of help files and tutorials and nothing seems to work, presumably due to changes in Studio 2010. I got so far as to register the DLL with regsvr32. Thats about it. No code snippet seems to play nice. Anyone have or know where to find something like http://www.autoitscript.com/forum/index.php?showtopic=4486 but for VB.net 2010? Any help would be grealtly appreciated. I really hope autoit can do this, I got real fed up with autohotkey. Link to comment Share on other sites More sharing options...
dukeofmuffins Posted August 31, 2010 Author Share Posted August 31, 2010 BUMP I still need help here. All I want is a clue as to how you load the DLL into VB and maybe an example of using a function. I have searched every forum post I could find but there is very little on DLLs in VB 2010, especially this one! Link to comment Share on other sites More sharing options...
dukeofmuffins Posted September 3, 2010 Author Share Posted September 3, 2010 I have been googling this subject for weeks now. I wanted to clarify my project in case anyone doesn't understand. I have a DOS based Point of Sale at work. I wanted to make a visual basic overlay for it so my staff won't have to memorize every product number (SKU), and make tracking details of food orders a lot easier. For example, if someone just ordered a drink, and you pushed the fountain drink button, it would send to the DOS POS (running in the background) "10002 [ENTER][ENTER][ENTER][ENTER]" I get the feeling that my question goes unanswered everywhere due to the typically bad-sounding nature of people who want to send keystrokes to background applications. Anyone who can help, I would send you screen-shots of my work setup so you know my purpose is legitimate. I can code the basic menus and procedures in VB easily, but the use of DLLs is beyond me. I am begging the community for some help in this! I know I am owed nothing but I would be eternally grateful. Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 4, 2010 Share Posted September 4, 2010 AU3_API long WINAPI AU3_ControlSend(LPCWSTR szTitle, LPCWSTR szText, LPCWSTR szControl, LPCWSTR szSendText, /*[in,defaultvalue(0)]*/long nMode);This is the function you need. To access it in VB.Net, you can use this.Public Declare Function AU3_ControlSend lib "autoitx.dll" (ByVal szTitle As String, ByVal szText As String, ByVal szSendText As String, Optional ByVal nMode As int = 0)To send your text, you'd use something to the effect ofAU3_ControlSend("DOS POS window title", "", "10002 {ENTER}{ENTER}{ENTER}{ENTER}")Forgive me if the code doesn't work first time. I don't use VB.Net. Link to comment Share on other sites More sharing options...
nusaki Posted September 11, 2010 Share Posted September 11, 2010 I get error: Error 1 Type 'int' is not defined. C:\Users\toto\AppData\Local\Temporary Projects\Aut Vb\Form1.vb 3 165 Aut Vb help please keywen.com Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 12, 2010 Share Posted September 12, 2010 My bad. Should have been Integer. I'm used to C#. Link to comment Share on other sites More sharing options...
nusaki Posted September 12, 2010 Share Posted September 12, 2010 (edited) My bad. Should have been Integer. I'm used to C#.omg it worked But its so confusing now, can you give me example for MouseClick("left") please, Edited September 12, 2010 by nusaki keywen.com Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 12, 2010 Share Posted September 12, 2010 AU3_API long WINAPI AU3_MouseClick(/*[in,defaultvalue("LEFT")]*/LPCWSTR szButton, /*[in,defaultvalue(AU3_INTDEFAULT)]*/long nX, /*[in,defaultvalue(AU3_INTDEFAULT)]*/long nY, /*[in,defaultvalue(1)]*/long nClicks, /*[in,defaultvalue(-1)]*/long nSpeed);BecomesPublic Declare Function AU3_MouseClick lib "autoitx.dll" (Optional ByVal szButton As String = "LEFT", Optional ByVal nX As Integer = -2147483647, Optional ByVal nY As Integer = -2147483647, Optional ByVal nClicks As Integer = 1, Optional ByVal nSpeed As Integer = -1)Used likeAU3_MouseClick("Left") Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now