I have read the thread:
http://community.slickedit.com/index.php?topic=2799.0and the documentation for _PipeShellResult, which states in the Example Section:
"_PipeShellResult("cd", status) returns the current working directory as reported by the operating system shell."
BUT IT DOESENT!
_PipeShellResult("cd", status) always returns an empty string and status of -2.
_PipeShellResult("test.bat", status) returns the current working directory when test.bat contains:
@echo off
cd
The trick to use a .bat file works! I am creating commands for the command line programmatically, so using the .bat file is not a viable option. Based on the documentation and the example in the documentation, I should be able to pass commands directly as strings and have them executed. I used the debugger and found that _PipeProcess (which is in the _PipeShellResult() function) returns a code of -2 if the cmdline argument is the command itself (like "cd" or "dir") which results in the function returning an empty string. I cannot debug into that function because it is an extern and slickedit cannot find the source code.
Whats the deal here? Anyone else have this problem? Im currently using v15 (2010) but may be upgrading to v17 (2012) soon.
One of the applications I am using this for is to populate a dropdown list with parsed information from the console output. It works great with the bat file, however, flexibility is very limited and I need to be able to use the function as it is documented to work.
Thanks for the help!
-Ryan