Jump to content
Sign in to follow this  
Guest Darksoul71

How-To: AutoItX and Delphi

Recommended Posts

Guest Darksoul71

Hi forum,

I just wanted to post my experiences with AutoIt and Delphi. Unfortunately there´s no unit which provides a Delphi interface for AutoIt but there is help :(

Follow the instructions at this site:

http://www.delphifaq.com/fq/q3081.shtml

Once you´ve registered the AutoItX.dll and imported the ActiveX compoment from Delphi (as described at the site above) a new component will be available at your toolbar. Just drag this component to your form and you are ready to go.

I just did a small experiment with the component:

AutoIt.Init;
  AutoIt.Run('notepad.exe','C:\',SW_MAXIMIZE);
  AutoIt.Sleep(2000);
  AutoIt.Send ('AutoIt rulez !!!',0);

Works fantastic ! Notepad pops up and the text is entered.

As I´m leaving quite early tomorrow morning to Belgium I wan´t have the time to do more experiments but now you should know how to deal with this.

Stay tuned,

-D$

Share this post


Link to post
Share on other sites
Guest Darksoul71

Share this post


Link to post
Share on other sites

BTW: This "small" code segment is generated by Delphi itself. You can dig through in order to find out how things are defined. Some parameters are a bit different compared to the AutoIt help but most of the stuff should be selfexplaining. This unit would be a good starting point to write a "wrapper unit" similar to a h-file in C by defining all functions and procedures as external referencing the AutoItX.dll. Nevertheless the component is much more convenient.

....

<{POST_SNAPBACK}>

Hello Darksoul71,

Thanks for you efforts to integrate AutoItX in Delphi. It's sure something to include with the documentation.

I will ask the author of AutoItX (Jon) if he can do so.

Regards,

-Sven

Share this post


Link to post
Share on other sites

Hi forum,

I just wanted to post my experiences with AutoIt and Delphi. Unfortunately there´s no unit which provides a Delphi interface for AutoIt but there is help :)

Follow the instructions at this site:

http://www.delphifaq.com/fq/q3081.shtml

Once you´ve registered the AutoItX.dll and imported the ActiveX compoment from Delphi (as described at the site above) a new component will be available at your toolbar. Just drag this component to your form and you are ready to go.

I just did a small experiment with the component:

AutoIt.Init;
  AutoIt.Run('notepad.exe','C:\',SW_MAXIMIZE);
  AutoIt.Sleep(2000);
  AutoIt.Send ('AutoIt rulez !!!',0);

Works fantastic ! Notepad pops up and the text is entered.

As I´m leaving quite early tomorrow morning to Belgium I wan´t have the time to do more experiments but now you should know how to deal with this.

Stay tuned,

-D$

Hi. I'm a new member of this forum and I need to use AutoItX with Delphi too.

sorry but the link you wrote (http://www.delphifaq.com/fq/q3081.shtml"]http://www.delphifaq.com/fq/q3081.shtml[/url) doesn't work.

Can you tell me the correct link where I could find the instructions? or can you send me the complete unit called AutoItX3Lib_TLB?

Thanks!!!

- Garruz

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...