Shell in Windows is based on the "current working directory" if you don't 
provide a full path to the "start" command.

Take a look at this tip for more info:

http://www.sonsothunder.com/devres/revolution/tips/shel002.htm

Ken Ray
Sons of Thunder Software, Inc.

On May 12, 2011, at 10:01 AM, Graham Samuel <livf...@mac.com> wrote:

> Mark, thanks - your suggestion means that the example in the docs is just 
> plain wrong (not enough quotes - apparently you need an empty set of quotes 
> before the one with the program name). But I doubt if this will solve the 
> problem of a program name with a space in it. So I still want to know what 
> 'shell' expects. Also, what if the .exe isn't in "Program Files"? It looks as 
> if the 'start' function makes some assumptions about the path to the program. 
> It is hard to step out of the LC environment without learning a lot of other 
> stuff...
> 
> I will do a few tests and then at least add a comment on the 'launch' 
> dictionary entry - but I am scared of my own ignorance on this subject.
> 
> Graham
> 
> 
> On Thu, 12 May 2011 12:16:42 +0200,  Mark Schonewille 
> <m.schonewi...@economy-x-talk.com> wrote:
> To: How to use LiveCode <use-livecode@lists.runrev.com>
>> 
>> Graham,
>> 
>> Try this:
>> 
>> set the hideConsoleWindows to true
>> put "start" && quote & quote && quote & "myProgram.exe" & quote into myShell
>> get shell(myShell)
>> 
>> --
>> Best regards,
>> 
>> Mark Schonewille
>> 
>> Economy-x-Talk Consulting and Software Engineering
>> Homepage: http://economy-x-talk.com
>> Twitter: http://twitter.com/xtalkprogrammer
>> KvK: 50277553
>> 
>> New: Download the Installer Maker Plugin 1.6 for LiveCode here 
>> http://qery.us/ce
>> 
>> On 12 mei 2011, at 12:03, Graham Samuel wrote:
>> 
>>> Following the instructions for "launch" in the LC docs, I tried the 
>>> substitute method suggested:
>>> 
>>> get shell("start MyProgram.exe")
>>> 
>>> this didn't work using the name of the program in Windows Explorer, 
>>> presumably because there was a space in the name.
>>> 
>>> I also tried to get a path to the program, which was reported by LC as 
>>> 
>>> C:/Program Files/My Tests/My Test.exe
>>> 
>>> and this failed too, with Windows reporting that it couldn't find 
>>> "Program". So shell doesn't like spaces. I thought that one could get rid 
>>> of that by replacing space with "%20" but that didn't work either.
>>> 
>>> Pardon my ignorance, but what should I have done?
>>> 
>>> Graham
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to