autoit8 Posted June 7, 2011 Posted June 7, 2011 I'm using AutoItX3 1.0 Type Library in my C# code. I want to use AutoIt to fill out the username and password of the login pop-up window ( class #32770), the window will popup when connecting to an Exchange Sever when create an outlook profile I put the function that will popup the login window in one thread and put the AutoIt operation on another thread, and I have a problem , once the login window popup, AutoIt just get blocked there(no matter what method I call from AutoIt, I try something like close window but the operations not relate to AutoIt works like I call other functions or print out something ), after I close the popup window, AutoIt starts working I don't want to put these two functions into two process. It's that I did something wrong? Thank you for any response.
Richard Robertson Posted June 7, 2011 Posted June 7, 2011 It's because it is expected to be loaded in a single threaded environment. It's not designed to perform concurrent operations.
JohnOne Posted June 8, 2011 Posted June 8, 2011 I think you should post some code, I have used autoitx in multithreaded C# applications in the pat without problem. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Richard Robertson Posted June 9, 2011 Posted June 9, 2011 You can use it in a multithreaded environment, yes, but you can't make multiple calls to it concurrently.
JohnOne Posted June 9, 2011 Posted June 9, 2011 I certainly take your word for that, but I think the OP cant get any call to work in his created thread. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Richard Robertson Posted June 9, 2011 Posted June 9, 2011 From what I understood he had one thread waiting for a window which meant that the COM object already had an active process.
JohnOne Posted June 9, 2011 Posted June 9, 2011 Dont know anything about com. Maybe my test app seemed to work fine with autoitx running functions in multiple threads, because I was just using it as a dll rather than com. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Richard Robertson Posted June 9, 2011 Posted June 9, 2011 That could very well be the difference. I should have said that COM objects expect a single threaded model.
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