Hi Liam,
The code you mentionned should work, but here is an easier way to do what you want :
1) In Quest interface, click on "Filter" then "Show library elements"
2) Find "Initinterface" function and click on it
3) In the displayed code, you should easily find "Raise UI request" script (it appears several times)
4) Select one and copy it from here, then paste it where you want to hide the command bar. Select "hide" in the dropdown list and leave the rest blank.
5) When you want to restore the command bar, copy/paste the same script, but select "show" in the dropdown list.
Hope it will be helpful