Oh. I see what you are talkin about. I never tried that.
Usually when I need lots of code run in conjunction with a Simulink model I modify the code and use embedded m function blocks in the Simulink model. So far this has worked very nicely.
There were very few times when I just opted out for this and exported the results from the Simulink model to .mat files. Then wrote a m-file to process these automatically.
Although neither of these is what you want, there should be a way to work around it. Maybe someone else has tried it.
Sorry I couldn't be of more help Steve.
Assuming you know the coordinates of the "buttons" you need to press, couldn't you use one of those simple mouse recorder programs. Essentially, you go record the mouse moves and clicks manually and then it generates a macro to execute that 'n' times you want. I think you can put delays in it too.