Interacting with ruby script

This forum is user-to-user based and not regularly monitored by IDM.
Please see the note at the top of this page on how to contact IDM.

Interacting with ruby script

Postby pbiolchini » Sat Feb 03, 2007 7:35 am

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?
User avatar
pbiolchini
Newbie
 
Posts: 2
Joined: Sat Feb 03, 2007 12:00 am

Re: Interacting with ruby script

Postby Mofi » Sat Feb 03, 2007 3:52 pm

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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Interacting with ruby script

Postby pbiolchini » Sun Feb 04, 2007 6:52 am

Thanks for the help!
User avatar
pbiolchini
Newbie
 
Posts: 2
Joined: Sat Feb 03, 2007 12:00 am

Re: Interacting with ruby script

Postby chris_go » Tue Mar 02, 2010 9:13 am

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
chris_go
Newbie
 
Posts: 4
Joined: Mon Jul 27, 2009 7:48 am

Re: Interacting with ruby script

Postby Mofi » Sat Mar 06, 2010 11:27 am

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.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Interacting with ruby script

Postby chris_go » Tue Mar 09, 2010 9:05 am

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
chris_go
Newbie
 
Posts: 4
Joined: Mon Jul 27, 2009 7:48 am


Return to UEStudio General Discussion