Jump to content

javascript ActiveXObject("AutoItX3.Control") Help !!


prakob
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...