Robotic Process Automation (RPA)

 View Only
  • 1.  Return value from Run Windows Script

    IBM Champion
    Posted Mon May 10, 2021 11:01 AM
    Hi,

    I would like to know how to return values from Visual Basic using the command Run Windows Script. I tried a couple of ways but was not successful.

    How should it be?

    ------------------------------
    Vinicius Marques
    ------------------------------


  • 2.  RE: Return value from Run Windows Script

    Posted Thu May 13, 2021 01:16 PM
    Edited by Angelo Alves Thu May 13, 2021 01:19 PM
    Hello Vinicius,

    You can use any command for write-in console, that is output text the RunWindowsScript

    Here have some sample:
    defVar --name exit --type Numeric
    defVar --name output --type String
    defVar --name error --type String
    runWindowsScript --scripttype "VBScript" --source "Text" --script "WScript.Echo \"IBM RPA\"\r\nWScript.StdOut.Write \"IBM \"\r\nWScript.StdOut.WriteLine \"RDA\"" --blockexecution  exit=exitcode output=output error=error
    logMessage --message " ${output}" --type "Info"

    runWindowsScript --scripttype "VBScript" --source "Text" --script "Dim StdOut : Set StdOut = CreateObject(\"Scripting.FileSystemObject\").GetStandardStream(1)\r\n\r\nStdout.WriteLine \"IBM Process\"\r\nStdout.Write \"IBM Workflow\"" --blockexecution  exit=exitcode output=output error=error
    logMessage --message "${output}" --type "Info"

    ------------------------------
    Angelo Alves
    ------------------------------



  • 3.  RE: Return value from Run Windows Script

    IBM Champion
    Posted Thu May 13, 2021 04:00 PM
    That is nice! Thank you very much.

    ------------------------------
    Vinicius Marques
    ------------------------------