# Backticks and timeouts

**URL:** <https://www.ruby-forum.com/t/backticks-and-timeouts/143833>\
**Category:** Ruby\
**Created:** [July 23, 2008, 4:58am UTC](https://www.ruby-forum.com/t/backticks-and-timeouts/143833 "2008-07-23T04:58:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenillen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@chenillen](https://www.ruby-forum.com/u/chenillen)\
**Post date:** [July 23, 2008, 4:58am UTC](https://www.ruby-forum.com/t/backticks-and-timeouts/143833/1 "2008-07-23T04:58:35Z")

</div>

I’ve never used Ruby before but need to try something tonight for sorta  
presentation tomorrow.  
The extent of my Ruby code is inside of RPG Maker XP (last minute thing  
had like 1 day to show my idea) and when someone walks over a certain  
tile it executes  
result = `notepad.exe`

That’s it. Problem is RPG Maker then times out if I don’t immediately  
close the notepad window. Is there any way to execute notepad.exe  
without actually expecting a result back? Just launch and forget about  
it?

---

<div class="post-metadata">

**Author:** ![chenillen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@chenillen](https://www.ruby-forum.com/u/chenillen)\
**Post date:** [July 23, 2008, 6:01am UTC](https://www.ruby-forum.com/t/backticks-and-timeouts/143833/2 "2008-07-23T06:01:43Z")

</div>

From: Allen Coley [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]

# The extent of my Ruby code is inside of RPG Maker XP (last

# minute thing had like 1 day to show my idea) and when someone

# walks over a certain tile it executes

# result = `notepad.exe`

# That’s it. Problem is RPG Maker then times out if I don’t immediately

# close the notepad window. Is there any way to execute notepad.exe

# without actually expecting a result back? Just launch and forget about

# it?

try IO.popen.

eg, try running the ff,

#–code  
io1= IO.popen “notepad.exe”  
5.times do puts “i am here” end  
io2= IO.popen “notepad.exe”  
5.times do puts “i am here again” end  
#–code

the above will invoke 2 instances of notepad and also run the 2 loops  
(no pause there).

(note, you may also use win32ole w wsh if you want to fully control  
notepad[eg if you want to send keystrokes to it])

hth.

Kind regards -botp

---

<div class="post-metadata">

**Author:** ![chenillen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@chenillen](https://www.ruby-forum.com/u/chenillen)\
**Post date:** [July 23, 2008, 6:15am UTC](https://www.ruby-forum.com/t/backticks-and-timeouts/143833/3 "2008-07-23T06:15:52Z")

</div>

> io1= IO.popen “notepad.exe”

That was all I needed right there and it worked like champ.
