Jump to content

Recommended Posts

Posted

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.

Posted

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!

Posted

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.

Posted

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 of

AU3_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.

Posted

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

Posted (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 by nusaki

keywen.com

Posted

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);

Becomes

Public 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 like

AU3_MouseClick("Left")

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...