lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


David,
 
Thanks! It works!
 
Best,
Yuanming Chen

 
On 3/5/06, David Morris-Oliveros <david.morrisoliveros@teambondi.com> wrote:
You can call "start" first:

os.execute('start "window title" "notepad.exe"')

The problem with start.exe is that the first quoted parameter is the
title of the window, so, doing this:

os.execute('start "c:\\full path\\to\\notepad.exe"')

Will open up a console window with the title bar as "c:\\full
path\\to\\notepad.exe", so, you have to put whatever infront of it, it
can just this:

os.execute('start "blah" "c:\\full path\\to\\notepad.exe"')

HTH.
David.


// David Morris-Oliveros
// Camera & Lua Coder
// david@teambondi.com



Yuanming Chen wrote:
> Recently I started to use LUA to write simple scripts to launch
> windows executables. But I noticed that when I call
> os.execute("notepad.exe") to spawn notepad application, the execution
> thread is blocked till one closes the notepad. Is there a way to
> execute the window executable without blocking? In my project, I don't
> care about whether the window executable is started correctly or not.
>
> Thanks for any thoughts on this.