Has anyone experimented with the PWBExecute feature and run into problems?
I'm trying to get it to run a command:
"c:\digger\digger.exe qld1"
but it is refusing to work. I'm guessing that that the problem is the command parameter and was wondering if PWBExecute should be able to cope with this?
I can get the app working if I call a batch file that runs the command for me, but that means I have to put up with the dos console, when I would prefer it to just launch the Win32 app.
This works:
window.external.PWBExecute('c:\\html\\programs\\qld1.bat');
These don't:
window.external.PWBExecute('c:\\digger\\digger.exe qld1');
window.external.PWBExecute('c:\\digger\\digger.exe\ qld1');
Escaping the '\' character was just a guess in case the underlying code wasn't prepared for that character, because I couldn't get anything working at first. As you can see I tried escaping the space in case PWBExecute was skipping it or ending the string there, but no luck.
Any Suggestions?
Ta,
Greg
PWBExecute in v2.05
Moderators: Tyler, Scott, PWB v2 Moderator
It is the parameter that is causing the problem. PWB does not currently take into consideration there may be a command line parameter present.
Instead, create a shortcut to the application and add the command in the shortcut target line. Then point the PWB JavaExecute command to the shortcut.
window.external.PWBExecute( 'C:\\digger\\digger.lnk' )
This will also work with spaces in the path.
window.external.PWBExecute( 'C:\\Program Files\\Editor\\ED.lnk' )
Please note, the PWB Dynamic External Java Commands can be change to different keywords in the PWB INI file to help prevent applications being run from unauthorized web pages, and can be disabled by setting the keyword to blank.
For example the following only enables the JavaExecute with a differnt Java keyword command.
[Java]
JavaExit=
JavaActivity=
JavaRegister=
JavaHideToolbar=
JavaExecute=MyPWBExecuteCommand
JavaReadINIFile=
--Scott
Instead, create a shortcut to the application and add the command in the shortcut target line. Then point the PWB JavaExecute command to the shortcut.
window.external.PWBExecute( 'C:\\digger\\digger.lnk' )
This will also work with spaces in the path.
window.external.PWBExecute( 'C:\\Program Files\\Editor\\ED.lnk' )
Please note, the PWB Dynamic External Java Commands can be change to different keywords in the PWB INI file to help prevent applications being run from unauthorized web pages, and can be disabled by setting the keyword to blank.
For example the following only enables the JavaExecute with a differnt Java keyword command.
[Java]
JavaExit=
JavaActivity=
JavaRegister=
JavaHideToolbar=
JavaExecute=MyPWBExecuteCommand
JavaReadINIFile=
--Scott