Jump to content

calling autoit script with variable as parameter from UFT


Recommended Posts

HI Guys,

Desperately looking for a solution here. I have the following script in UFT which is working fine. However I want to substitute this hard coded parameter by variables  rpdate & LegalEntity . I have tried with lot of options here. but not able to call the autoit exe file.

Dim rpdate
Dim LegalEntity
LegalEntity = 36004367

rpdate = "28-02-2017"
'Legal_entity_Id = "36000586"
path = "H:\Sprint\Automation\Corepautomate.exe"

Set oAutoIt = CreateObject("AutoItX3.Control")

oAutoIt.Run("H:\Sprint\Automation\Corepautomate.exe 28-02-2017 36004367")

The autoit script is which is also working fine.

 

If $CmdLine[0] = 2 Then
    ; No need to use "Call" - just name the function and pass the parameters
    corep_reports($CmdLine[1], $CmdLine[2])
EndIf

 

Func corep_reports($rpdate, $legalentity)

------------------------------

-------------------------
EndFunc

 

 

Edited by Mahesh123
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...