Skip to content

AutoITScriptHandler function

This function is used to trigger auto it script defined in Data > Manage AutoITScript Section.

Firstly you have to define your AutoIt script by navigating to Data > Manage AutoIT Script as shown below:

Note: Name defined in Manage AutoItscripts will be used in the function to execute this script.

Select RUN command from the action dropdown and leave Screen and Element key as blank, edit parameter section and click on Form, select functions from the dropdown and select AUTOITSCRIPTHANDLER function. Provide the name of Autoit script in the form.

In some cases, we need to pass arguments to AutoItscripts in order to parameterize the script. In those cases we will pass the arguments from steps.

Define the arguments and use them in your AutoIt function as shown below

AutoIt script will takes the arguments from above steps and then it can be used as shown below

 

Local $iVar_A1=$CmdLine[1]Local $iVar_A2 =$CmdLine[2]Sleep(2000)
WinWaitActive(“Windows Security”)
Sleep(2000)
WinWaitActive(“[CLASS: Credential Dialog Xaml Host]”, “”, 10)
Send($iVar_A1)
Send(“{TAB}”)
Sleep(2000)
Send($iVar_A2 )
Sleep(1000)
Send(“{Enter}”)

 

Here argument 1 will be passed in $CmdLine[1] and argument 2 will be passed in $CmdLine[2].

 

The above AutoIt Script is a sample script for handling windows credential pop up.

 

Back To Top