Modulating size of graphs keeping it in autosize mode

I am trying to modulate a size of graph and after modulating it at certain value I want to make it auto mode again.
I make it as sequence and worked with commend window, but with procedure file, only the last commend works.
can any experts explain why this happens and how to make it as a sequence commend?

Function test()
    ModifyGraph width=194.4,height=252     
    ModifyGraph width=0,height=0
end
Definitely it works!

Thanks for your help!
HJDrescher wrote:
Not tested, but a DoUpdate between the commands might help
HJ