help ! video mirroring scripts

hi … does anybody know if i can script the video mirroring action for a powerbook … ?
i cant seem to find a key value to simulate …
is there another way … ?
thanks for your help
Simon