Access "Control Click" of Application/Icon in the Dock via Applescript

Is it possible to access the menu via Applescript that is available when you “right click” or “control click” on an icon in the dock? If so, can you provide an example if I wanted to “right click” on the Safari Application icon in the Dock?

The dock is not GUI scriptable – better to go after what you want directly in Safari.

Okay thanks. Just trying to figure out how to move a window from one space to the next in Leopard Spaces. I can “switch” spaces by using the keystroke command, but if I activate safari to make a new window, spaces takes me to another space where the current Safari window is. This is a pain if you want to open up additional windows in different spaces.