Thanks for all your help. Although I was sure it was doing what I thought in Windows proper last night, in checking I cannot make it work in windows either today - perhaps it didn't last night either and I got it wrong. Still interesting though. To answer further though, the language the program uses is a form of c, however I have also tried to include direct.h in the program scripts but they didn't want to compile - I guess the language isn't quite the same as c. In particular I do not think it can use pointers. Although this does not work it would be interesting to know what would happen in other programs such as matlab that also let you acces the shell the program i running in. Thanks again for all the replies. Ali