Try now:
#!/bin/bash
pgrep ardour >/dev/null
if [[ $? -eq 0 ]]
then
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
else
notify-send "ardour is not running!"
fi
Make sure this script is executable:
chmod +x ./path_to_script