v3n0m Posted July 30, 2006 Share Posted July 30, 2006 hi folks, I've got a very annoying problem :S I'm trying to use the autoitx3.dll in vb.net 2003. afaik that shouldn't be a problem, but I can't seem to get it to work I registered the dll, added it by pressing project > add reference, and I added the line: Dim cAutoit As AutoItX3Lib.AutoItX3 when I call a autoit function, like: cAutoit.Send("a") I get the followin error message: An unhandled exception of type 'System.NullReferenceException' occurred in [exe name] does anybody have a clue how to fix this? it worked perfectly in vb6, and it still works in vbscript too. the reason I switched from vb6 to vb.net, is a very high cpu usage for my app, so the pc became almost unworkable, and the app works great in vb.net only the implementation of autoitx :S thanks in advance v3n0m Link to comment Share on other sites More sharing options...
jvetter713 Posted July 30, 2006 Share Posted July 30, 2006 Dim cAutoit As New AutoItX3Lib.AutoItX3 Link to comment Share on other sites More sharing options...
v3n0m Posted July 31, 2006 Author Share Posted July 31, 2006 OMG!!!!!!! thanks man, that did the trick I think I know why I didn't add the NEW in the dim line: when I found that I couldn't get the thing to work, I copied the line from one of my older projects (in vb6), which was just Dim cAutoit As AutoItX3Lib.AutoItX3 MAN!, thanks so much, now I can continue programming the function I want (pressing a key, and keep it pressed) is even in vb.net (sendinput), but I couldn't get that to work :S and I know I can with autoit, so this should solve the problem. Link to comment Share on other sites More sharing options...
Richard Robertson Posted August 1, 2006 Share Posted August 1, 2006 You could also use Dim cAutoIt As AutoItX3Lib.AutoItX3 cAutoIt = New AutoItX3Lib.AutoItX3() 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