Forum: RSpec starting a program from ruby on windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7070c0ca59124b4d96dd27ea52ad359e?d=identicon&s=25 Jeff Bowen (jabowen)
on 2009-03-01 20:18
I simply want to start another program from this GUI and let the GUI
continue doing its own thing.  The other program will run independent of
the GUI and should stay running if the GUI is closed.

require 'fox16'
include Fox

class ClipMainWindow < FXMainWindow
  def initialize(anApp)
    # Initialize base class first
    super(anApp, "TEST", :opts => DECOR_ALL, :width => 500, :height =>
300)

    # The CCTV button
    button = FXButton.new(self, 'Connect To CCTV', :opts =>
BUTTON_NORMAL|LAYOUT_LEFT|LAYOUT_FILL_X)
    Dir.chdir("\\program files\\VBrick\\StreamPlayerPlus\\")
    button.connect(SEL_COMMAND){`StreamPlayerPlus.exe`}
    #button.connect(SEL_COMMAND) {Thread.new{(`StreamPlayerPlus.exe`)}}
    #button.connect(SEL_COMMAND) { exec("\\program
files\\VBrick\\StreamPlayerPlus\\StreamPlayerPlus.exe") }

  end

  def create
    super
    show(PLACEMENT_SCREEN)
  end
end

if __FILE__ == $0
  FXApp.new("TEST", "FXRuby") do |theApp|
    ClipMainWindow.new(theApp)
    theApp.create
    theApp.run
  end
end
This topic is locked and can not be replied to.