prakob Posted June 11, 2011 Posted June 11, 2011 Hi all, This is my first post, my first time playing around with autoIt so if I did some stupid things, please, forgive. I'vd just installed the latest v3.3.6.1 full package, did two days reading this forum and try out this below code in IE8 : <script language="javascript" type="text/javascript"> var oAutoIt = new ActiveXObject("AutoItX3.Control"); oAutoIt.Run("notepad.exe"); </script> IE Error: Automation server can't create object I'm running WindowsXP. I saw few post using javascript with AutoItX so my simple test shouldn't have any problem, right ? What have I done wrong ? Thanks in advance. Any suggestion/advise are welcome. Regards Prakob
Richard Robertson Posted June 11, 2011 Posted June 11, 2011 The problem is that you shouldn't be doing that.
prakob Posted June 11, 2011 Author Posted June 11, 2011 The problem is that you shouldn't be doing that.Hi Richard,Why shouldn't I do that ? please, state the case. What have I done wrong ? Please, advise the proper way.ThanksPrakob
Richard Robertson Posted June 11, 2011 Posted June 11, 2011 You shouldn't be loading AutoIt in a browser.
prakob Posted June 12, 2011 Author Posted June 12, 2011 Hi all, This is my first post, my first time playing around with autoIt so if I did some stupid things, please, forgive. I'vd just installed the latest v3.3.6.1 full package, did two days reading this forum and try out this below code in IE8 : <script language="javascript" type="text/javascript"> var oAutoIt = new ActiveXObject("AutoItX3.Control"); oAutoIt.Run("notepad.exe"); </script> IE Error: Automation server can't create object I'm running WindowsXP. I saw few post using javascript with AutoItX so my simple test shouldn't have any problem, right ? What have I done wrong ? Thanks in advance. Any suggestion/advise are welcome. Regards Prakob After a day of digging, here is the solution for anyone having this same problem : This issue has nothing to do with AutoItX but for a reference. By using ActiveXHelper (ActiveX utility) I can see two entries. One for PSFactoryBuffer ProgID:no, control:no, Threading Model:Both and the other one for AutoItX3 Class ProgID:AutoItX3.Control.1, control:no, Threading Model:Apartment both status are Enable. This means the AutoIt installer package is working fine. Registers are in place and the AutoItX is ready to use. The problem come from IE8 See this post. That's a solution with an ugly stupid IE label on top of the page. A better solution is Enable the following settings: ->Trusted sites zone -->Site --->Add your site (Don't forget to uncheck Require sever verification (https)for all sites in the zone. -->Custom --->Run ActiveX controls and plug-ins : Enable --->Initialize and script ActiveX controls not marked as safe : Enable That is !! Now AutoItX can perfectly run with javascript (JScript) with a nice Trust Sites sign under the page. A bit troublesome but it's the way. Unfortunately, we must do all these steps on all IE7-8 computers !! Maybe, some IE hack later to automate the ask with AutoIt hahaha. Enjoy
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