Jump to content

How to control a client from SAP© ABAP© with AutoItX


 Share

Recommended Posts

Hello community,

it is very easy to control a client system from SAP© ABAP© with AutoItX. Use the transaction code SOLE to register AutoItX on the SAP© system and type in the fields the following content:

  • OLE Application: AutoItX3.Control
  • CLSID: {1A671297-FA74-4422-80FA-6C5D8CE4DE04}
  • CLSID Type Lib: {F8937E53-D444-4E71-9275-35B64210CC3B}
  • OLE-Objectname: AutoItX3.Control
  • Language: DE
  • Text: Scripting language designed for automating the Windows GUI
Do not forget to register AutoItX on the client system via regsvr32.exe AutoItX.dll.

Now you can use AutoIt from ABAP©, look at the simple example, it call notepad and type a text in it:

INCLUDE OLE2INCL.

  DATA AutoIt TYPE OLE2_OBJECT.
  DATA pid TYPE i.

  CREATE OBJECT AutoIt 'AutoItX3.Control'.

  CALL METHOD OF AutoIt 'Run' = pid EXPORTING #1 = 'notepad.exe'.

  CALL METHOD OF AutoIt 'WinWaitActive' EXPORTING #1 = 'Unbenannt - Editor'.

  CALL METHOD OF AutoIt 'Send' EXPORTING #1 = 'Hallo von ABAP'.

  FREE OBJECT AutoIt.

You see how easy it is.

Cheers

Stefan

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...