The eccoMAGIC Forums
http://forums.eccoMAGIC.com/forum/YaBB.pl Everything eccoMAGIC >> Issues, Comments, and Questions >> emSpawn to launch webpage? http://forums.eccoMAGIC.com/forum/YaBB.pl?num=1243585248 Message started by rb on 05/29/09 at 03:20:48 |
Title: emSpawn to launch webpage? Post by rb on 05/29/09 at 03:20:48 I am trying to launch a URL from LUA and using emSpawn: os.execute("emSpawn.exe /! http://msn.com") Why do I need to close the DOS window before the Browser launches the page? I just want the page to open in the Browser... |
Title: Re: emSpawn to launch webpage? Post by Admin on 05/29/09 at 06:48:48 good question. have not tested, so fill me in. What dos window ? if you test from cmd line, for example, works fine ? just from the LUA execute is opening a dos window ? does a "exit && emSpawn.exe ....etc..." do any better ? |
Title: Re: emSpawn to launch webpage? Post by rb on 05/29/09 at 12:25:13 With DOS window, I meant the Command window (cmd.exe). Best explained with examples: 1. os.execute("notepad.exe") => Opens a cmd window and Notepad. However, LUA is halted until notepad closed 2. os.execute("emSpawn.exe / notepad.exe") => Doesn't work . I only get 2 cmd windows that opens/closes 3. os.execute("emSpawn.exe /! notepad.exe") => Almost works as expected. Opens and closes a cmd window (unexpected), and then opens Notepad Now, I would like to open a URL instead of Notepad. 4. os.execute("emSpawn.exe /! http://msn.com") => Cmd window opens and execution halted. I need to close the window before the Browser URL is launched and execution continues How would I open the Browser URL w/o having to close the cmd window? Notes: 1. Not sure how to open a URL from cmd promt? Simply typing the URL doesn't work (actually surprised that example 4 works at all) 2. However, I can open a URL from Windows Start|Run by simply typing the URL 3. 1. I don't understand what you mean by does a "exit && emSpawn.exe ....etc..." do any better ? |
Title: Re: emSpawn to launch webpage? Post by rb on 05/29/09 at 22:10:29 rb wrote:
To answer my own question: start http://msn.com launches the URL in the Browser from cmd prompt. Furthermore, os.execute("start firefox.exe http://msn.com") Opens the URL in the Browser w/o the need for emSpawn.exe The cmd windows still opens briefly. Not sure if there is a way to hide this? |
Title: Re: emSpawn to launch webpage? Post by Alec_Burgess on 05/29/09 at 23:19:36 rb wrote:
To answer my own question: start http://msn.com launches the URL in the Browser from cmd prompt. Furthermore, os.execute("start firefox.exe http://msn.com") Opens the URL in the Browser w/o the need for emSpawn.exe The cmd windows still opens briefly. Not sure if there is a way to hide this?[/quote] Have you tried "start /b"? From WinXP Help "Command-line reference A-Z" Quote:
|
Title: Re: emSpawn to launch webpage? Post by rb on 05/30/09 at 00:33:33 Just tried your suggestion: os.execute("start /b firefox.exe http://msn.com") Still get the cmd window opening and closing. Btw, I am executing the LUA command in EccoExt Expression Evaluate (opens by ctrl-alt-k) |
The eccoMAGIC Forums » Powered by YaBB 2.1! YaBB © 2000-2005. All Rights Reserved. |