Supressing script error message
Supressing script error message
I have a script file containing only paths. I use it as a menu, so I load it with the load command. When I choose a path from the appearing menu, which doesn't exist, I get an error message "Not found location or item" then the script also send me an error message "Path could not be accessed." Is it possible to supress the second one, the script error message somehow?
Re: Supressing script error message
Not that I know of, but this is a workaround if you are interested, it would make sure you'd only have paths that are available shown in the menu, so no chance of either error messages:
Code: Select all
$script = "";
foreach($path, readfile("<xyscripts>\paths.xys"), <crlf>) {
if (exists($path) == 2 || $path == "-") { $script .= $path . <crlf>; } }
load $script,, "s";
Re: Supressing script error message
Great idea, thank you!