[bug] Could not execute command line!

Ask questions about how to create a script or swap scripts with other users.
Post Reply
User avatar
pjj
Posts: 2109
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

[bug] Could not execute command line!

Post by pjj »

This is the error message which I get while invoking

Code: Select all

MainApp.RunAppAndWait("c:\windows\notepad.exe", "", false, false);
When I run

Code: Select all

MainApp.RunApp("c:\windows\notepad.exe", "", false, false);
nothing happens at all. What's wrong? And yes, I have notepad.exe in c:\windows directory (I tested other programs and locations, too). Probably it's not my firewall (I switched it off.)

(BTW, the docs are erroneous as per quoting strings: single quotes don't work, you get immediately
')' expected
error message.)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
User avatar
Rickard Johansson
Site Admin
Posts: 6577
Joined: 19 Jul 2006 14:29

Re: [bug] Could not execute command line!

Post by Rickard Johansson »

It's not really a bug. You just have to type

MainApp.RunAppAndWait("c:\\windows\\notepad.exe", "", false, false);

when using a C++ or Java script. In Pascal you can use

MainApp.RunAppAndWait('c:\windows\notepad.exe', '', false, false);

The documentation use single quotes as is used in a Pascal script, but it probably should tell the user to use double quotes in other script languages.
User avatar
pjj
Posts: 2109
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: [bug] Could not execute command line!

Post by pjj »

What a coincidence! I came to conclusion I should have filled this in "Bugs" sections, so I started to move it there, when I saw you reply. Many thanks! You are, of course, right, double slash is the solution. And as for the docs, yes, they should tell the user to use double quotes. And I should write more about the docs, and I will -- but some other time. Thanks again.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
Post Reply