Jump to content
Mahesh123

calling autoit script with variable as parameter from UFT

Recommended Posts

Mahesh123

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

Share this post


Link to post
Share on other sites
JLogan3o13

Moved to the correct forum


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Mahesh123

<pointless repost of original content deleted>

@Mahesh123 please wait 24 hours before bumping your thread, and please don't simply quote everything you already said - it needlessly pads the thread.

Edited by JLogan3o13

Share this post


Link to post
Share on other sites
Mahesh123

@JLogan3o13 : Sorry. I was trying to edit some stuff in original post.. But could not find a way. That's why re-posted

Share this post


Link to post
Share on other sites
Mahesh123

Hi All,

Anybody got a chance to look into this query

Mahesh

 

Edited by Mahesh123

Share this post


Link to post
Share on other sites
Mahesh123

Any update??

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

×