Interacting with ruby script

Interacting with ruby script

2
NewbieNewbie
2

    Feb 03, 2007#1

    I would like to run ruby scripts that require user interaction during execution. Is there a way to set up UEStudio or UltraEdit to do this? Can I force the script to run in a DOS Command window?

    6,675585
    Grand MasterGrand Master
    6,675585

      Feb 03, 2007#2

      If the Ruby interpreter (EXE) is a 32 bit console application, then yes. Just create a user tool which runs ruby (specify full path to the Ruby EXE) with the current script you edit (for example "%f").

      It's important that you have NOT activated the Alternate Capture Mode in the Advanced menu. And the Ruby tool must be configured as Dos program with Show DOS Box enabled and Capture Output NOT checked.

      If you are talking about direct Ruby support of UEStudio than I can't help you because I don't have Ruby nor do I know anything about Ruby.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Feb 04, 2007#3

        Thanks for the help!

        4
        NewbieNewbie
        4

          Mar 02, 2010#4

          Hi all,

          does anybody know how to get this working with UE 15.20 portable?

          I want to run a ruby-script (with ruby.exe configured as a user tool) and like to be able to put in some user input into the opening command window. But that is not possible because it closes immediately.

          Regards

          Chris

          6,675585
          Grand MasterGrand Master
          6,675585

            Mar 06, 2010#5

            I don't use UEP and so can only give some general hints without testing. First you should verify that running your ruby script really works and the window is not immediately closed because Windows can't find the executable.

            If there is no problem for Windows to run the Ruby interpreter executable, it may help when you call the interpreter via Windows standard command start. Open Advanced - DOS Command and execute the command start /? to see all options this command offers.

            It should help to insert on the command line of the user tool left everything you currently have start "Ruby" /wait your existing command line

            The "title" is optional - in the example above "Ruby" is used, but only when the entire command line contains no double quote. Normally double quotes are needed because of spaces in paths and therefore it is always better to call command start with a title.
            Best regards from an UC/UE/UES for Windows user from Austria

            4
            NewbieNewbie
            4

              Mar 09, 2010#6

              Hi Mofi,

              thank you very much for the tip regarding the "start" application.
              This works fine to the point where the command window closes even when using the /wait parameter with a ruby script.

              I found a solution :D using a cmd /k in front of the ruby.exe command line like this:

              cmd /k c:\dev\Ruby19\bin\ruby.exe "%f" %modify%

              and setting the first line in the ruby script to:

              #!C:\DEV\Ruby19\bin\ruby.exe

              Regards

              chris_go