Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can I call wordpad in a ruby script ?

Posted on 2010-09-20
3
Medium Priority
?
524 Views
Last Modified: 2012-05-10
I am generating a report, actually several little reports that take up more than a screen.

Is there an easy way to create a text file in ruby and then call it in wordpad ?

I just need to use a mouse to look at the pages of data.

0
Comment
Question by:TIMFOX123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:TIMFOX123
ID: 33716755
this is just running on a xp laptop and it is my workstation.
0
 
LVL 2

Accepted Solution

by:
analyticphilosophy earned 2000 total points
ID: 33717109
You can use system() to call files on the command line.  So system("C:\Windows\wordpad.exe"), replacing the quoted string with the actual location of the Wordpad executable on your system.

You can also use IO::popen.  IO.popen("C:\Windows\wordpad.exe").  
0
 

Author Closing Comment

by:TIMFOX123
ID: 33720331
this will do it !!!!!

thank you so much

Dave
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: narshlob
If you've ever programmed in Ruby and have come across either a proc or a lambda, you might have been wondering what the difference is between the two and when you would use one over the other. This article will try to explain the difference between…
Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question