[[PageOutline]] This page is one of the !MapGuide Community CodeSamples. Visit the CodeSamples page to view more! == Overview == This html page can automatically invoke a named viewer command on viewer startup based on the value of a {{{Cmd}}} query string property. This uses the {{{InitialTask}}} property of the Web Layout. For example setting this initial task pane url: {{{ http://path/to/autostart.html?Cmd=Measure }}} Will launch the Measure command on viewer startup. As you can see from the code below, we need to employ initialization checks [http://trac.osgeo.org/mapguide/wiki/CodeSamples/JavaScript/AJAXViewerEventHooking just like in the event hooking example], to make sure we can start using the Viewer API when the frames have been fully initialized. autostart.html {{{