[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: subprocess on Windows

Quiroz, Hector

1/26/2006 3:27:00 PM

I don't know much about Windows any more but I do remember the 'start' command. I think you can launch apps and specify windows attributes on the command line.

Hope it helps.

Hector

-----Original Message-----
From: Robert Klemme [mailto:bob.news@gmx.net]
Sent: Thursday, January 26, 2006 9:18 AM
To: ruby-talk ML
Subject: Re: subprocess on Windows


Jeffrey Schwab wrote:
> Whenever my Windows rubyw script launches a subprocess, a command
> window pops up and immediately disappears. How can I keep this from
> happening?
>
> Details:
>
> I keep a daily log of what I do at work. At the command line, I type
> "log" to edit the current day's log file. A Ruby script generates an
> appropriate name for the file automatically, then launches vim.
>
> Now I'm trying to use the Windows GUI, and I want to have an icon I
> can click to launch gvim. Here's the code:
>
> # log.rbw
> # Launch gvim on today's logfile, e.g. on
> # C:\Logs\2006\2006.01\2006.01.26.txt
>
> logfile = Time.now.strftime('C:\Logs\%Y\%Y.%m\%Y.%m.%d.txt')
> system("gvim", logfile)
>
> When I click the icon, I get the expected behavior, except that a
> Windows cmd.exe window flashes on the screen first. :(

One thing is you can change the linke to open the window minimized. And I
think I remember seeing a rubyw or such in the windows distribution that
does not open a cmd shell. HTH

robert




1 Answer

Fustigator

4/12/2013 2:27:00 PM

0

Vitae forma vocata poilagratter <address_is@invalid.invalid> , die
Fri, 12 Apr 2013 11:35:59 +0000 (UTC), in littera
<kk8riv$obu$4@speranza.aioe.org> in foro be.politics(et aliis) vere
scripsit quod sequitur:

>"Albert, Archi-druide fran?ais" <albert@france> wrote:
>> Le 12/04/2013 11:07, poilagratter a ?crit :
>>> "Albert, Archi-druide fran?ais" <albert@france> wrote:
>>>>
>>>>>
>>>> C'est le mot "travail" qui vous g?ne ?
>>>>
>>> Ne parle pas de ce que tu ne connais pas.
>>>
>>
>> Bon alors le pur porc vous bougez votre couenne, on l'a fait cette vid?o ?
>>
>Un Harlem Shake ? Pour moi c'est d'accord, mais tous les posteurs de scb
>doivent y participer.
>Moi sur tes ?paules en Manneken Pis. ;-)

?a lui fera un dr?le de shampoing!:-)))
--

Fusti