Skip to main content

Hi,Is there any way to print something on console from rumba script.For example in vb script we can use Console.WriteLine , we can use echo in bat files .Is there any similar command in Rumba script.


#Rumba

Hi,Is there any way to print something on console from rumba script.For example in vb script we can use Console.WriteLine , we can use echo in bat files .Is there any similar command in Rumba script.


#Rumba

Hi nivedita1,

no, there is no way to send output to the command window (from which you are executing your rumba scripts) directly from the script.

You can write to file from your script and in your batch files you can echo the file contents to the command window.

Using this approach you could chain multiple scripts in you batch file and echo text to your command window between Rumba scripts execution.


Hi,Is there any way to print something on console from rumba script.For example in vb script we can use Console.WriteLine , we can use echo in bat files .Is there any similar command in Rumba script.


#Rumba

Hi nivedita1,

here is a sample.

Batch file contents.

       echo off

   REM Just turned echo off

   REM Set a text colour

       color 0a

   REM Navigate to where you want go on disk

       c:

       cd c:\\temp

   REM Call the Rumba script which you wish to provide data for your command window

     "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\System\\ScriptEngine\\vsp.exe" c:\\temp\\WriteStringToFile.csf

   REM Add a short delay, in the case 2000 milliseconds

       PING 1.1.1.1 -n 1 -w 2000 >NUL

   REM echo the output of the Rumba script which you have written to file

       type MyString.txt

       echo on

And here is my WrtieStringToFile.csf

   Sub Main

    Dim MyString as String

    EMReadScreen  MyString, 80, 1, 1

    FName = "c:\\temp\\MyString.txt"

         Open FName For output As #I

         Print #I , "MyString = " & Chr(34)  &  MyString & Chr(34)

    Close #1

   End Sub

Hope that helps.