Finally fixed the sunroof. Aside from breaking certain parts while trying to work out how it all worked, I think the main problem was lack of lubrication. It's working great now.
While I had the headlining out I decided to get it recovered seeing it was very dirty and was starting to separate in places. It was redone by a company in Blacktown (NSW) for A$150 including material. I fitted it last night.
Still have the replacement auto transmission sitting in the boot ready to fit. I am just waiting on a new torque converter seal and filter kit coming from BMA Parts (USA), as these parts were very expensive locally.