Just escape the parentheses in your $exec command like:
Code: Select all
$exec("%PROGRAMFILES(X86)%\XYplorer\XYplorer.exe" /script="::echo exists$('%1'$)")
explains how to escape chars like $, (, )...
E.g.:
Code: Select all
$exec("%PROGRAMFILES(X86)%\XYplorer\XYplorer.exe" /script="::if $(exists$('%1'$) == 1$) ${ goto '%1'; sel '+0'; focus; $} else ${ goto gpc$('%1', 'parent'$); selectitems gpc$('%1', 'file'$); sel '+0'; focus; $}")