Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
stefan_schnell
Active Contributor
AutoIt is a phantastic scripting language and offers great possibilities to automate UI activities and general scripting. In the past I presented a lot of different examples with AutoIt. Another perspective in this "round dance" is the possibility to use AutoIt with ABAP in Eclipse to automate your recurring development activities.

To do that I create in my workspace directory a new directory with the name Scripts. After I did that I see in my project tree a new node with the same name.



In this directory I copied my AutoIt scripts. As example I use two scripts which uses only key commands. It closes all tabs and opens a new set of development objects.
;-Begin-----------------------------------------------------------------

;Activation of the Eclipse window
If WinActivate("<ABAP>") Then

;Waits until the Eclipse window is active
WinWaitActive("<ABAP>")

;Closes all editors
Send("{CTRLDOWN}{SHIFTDOWN}w{SHIFTUP}{CTRLUP}")
WinWaitActive("<ABAP>")

;Opens dialog to open an ABAP development object
Send("{CTRLDOWN}{SHIFTDOWN}a{SHIFTUP}{CTRLUP}")
;Waits until the dialog is active
WinWaitActive("Open ABAP Development Object")
;Fills the search string field and fire
Send("nsp_cl_bs_xl_4ui_dpc_ext{ENTER}")
;Waits until the Eclipse window is active
WinWaitActive("<ABAP>")

;Opens dialog to open an ABAP development object
Send("{CTRLDOWN}{SHIFTDOWN}a{SHIFTUP}{CTRLUP}")
;Waits until the dialog is active
WinWaitActive("Open ABAP Development Object")
;Fills the search string field and fire
Send("nsp_cl_gw_data_4ui{ENTER}")

EndIf

;-End-------------------------------------------------------------------

On this way it is very easy to restore a specific configuration of editors.

Also you can use now very easy the complete command set of AutoIt comfortable and you can execute your scripts direct from the Eclipse UI via an double click on the script.

For that all you have to do is to select the AutoIt interpreter in the Editor Selection, with the activated checkboxes - Use it for all au3-files.

3 Comments
Labels in this area