Tim Hoolihan
6/14/2006 9:23:00 PM
Your welcome.
I see someone got to your first question. As for your original question
(automating of windows commands), you might want to look at expect.
It's a tool for automating cmdline interaction and there is a windows
port. If you really want to stay in ruby, there is a ruby library for
expect.
arose wrote:
> Ok I half way understand what you are saying, I'm experimenting..
>
> I haven't used the ` character yet in Ruby
> Have time to explain it to me?
>
> You have responded to a large number of my elementary questions,
> thanks.
>
>
>
> Tim Hoolihan wrote:
>> if you use commands that are native to the command line, the window will
>> come up.
>>
>> For instance, put the following in a .rb file and double click it:
>>
>> #!ruby.exe -w
>> #cmdlinetest.rb
>> pwd=`cd`
>> puts "current directory:#{pwd}"
>> user=`whoami`
>> puts "you are logged in as:#{user}"
>> exit if gets
>>
>>
>> arose wrote:
>>> What would I have to do to get Ruby to do the equivalent of typing cmd
>>> in Windows Run and then interacting with the command prompt?
>>>
>>> I'm looking at some automation of running commands from the dos prompt.
>>>
>