Hi Guys,
I want to add a new script, so I took the sample script and made some modifications.
The script is enabled and registerd with the option "Launch executables" in the security tab.
The following code adds a menu entry and then external application should be started.
function GetMenu()
{
local entries = ::wxArrayString();
entries.Add(_T("mymenu/explorer"),1);
retrurn entries;
}
function OnMenuClicked(index)
{
switch (index)
{
case 0:
local executing = _T("explorer.exe");
::ShowMessage(executing);
local retval = IO.Execute(executing);
// local retval = IO.ExecuteAndGetOutput(executing);
break;
...
In my case only the ShowMessage appears, but no external application starts. What I am doing wrong?
Thanks.
Mario
What happens with ::wxExecute ?
I looks like a search path problem.
Try with "c:\\windows\\explorer.exe" or wherever win is installed.
Hi DonSixto,
I tried you modification but the application is not started. How can I use ::wxExecute within a script?
Thx,
Mario
Assuming that IO.Execute is right, then your interpreter is configured not to let lauch external programs, specially if it is run inside a web browser.
What language is it ? It looks like a .net app.
The language is called squirrel (http://squirrel-lang.org)
It is a strange behaviour. If I call external applications like insight (the executable is in $PATH) the IO.ExecuteAndGetOutput(executing) works within a script. Other executables like explorer that are also in $PATH, are not started.