Puzzled by this one. I have a toolbar button with the On left-click field set to load a script (load "myscript.xys"). When I press the button, it just displays the script (with variables assigned) in a popdown rectangle instead of doing the action of the script. I have other scripts bound to buttons that work just fine. I assume there's something wrong with the scripting code? But why does it show the script instead of running it? See below. All it does is that if I selected a html file, it looks for and also selects the corresponding _files folder as created when you save a complete web page from chrome.
// Get the base name of the selected file
$name = <curbase>;
// Build the path to the corresponding _files folder
$filesFolder = "<curpath>\" . $name . "_files\";
// Check if the _files folder exists
if (exists($filesFolder) == 2) {
// Select both the HTML file and the _files folder
selectitems <curitem> . "|" . $filesFolder;
}
XYplorer Beta Club