Partager via


Commands S-Z (C++)

Command identifiers S-Z for C++.

  • IDM_SAVEAS
  • IDM_SELECTALL
  • IDM_SIZETOCONTROL
  • IDM_SIZETOCONTROLHEIGHT
  • IDM_SIZETOCONTROLWIDTH
  • IDM_STARTDIAGNOSTICMODE
  • IDM_STOP
  • IDM_STRIKETHROUGH
  • IDM_SUBSCRIPT
  • IDM_SUPERSCRIPT
  • IDM_TEXTAREA
  • IDM_TEXTBOX
  • IDM_UNBOOKMARK
  • IDM_UNDERLINE
  • IDM_UNDO
  • IDM_UNLINK
  • IDM_UNORDERLIST

IDM_SAVEAS

Saves the current webpage to a file.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_SAVEAS
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    This command displays a dialogue box if nCmdExecOpt is set to MSOCMDEXECOPT_DODEFAULT, MSOCMDEXECOPT_PROMPTUSER, or NULL. It does not display a dialogue box if the argument is set to MSOCMDEXECOPT_DONTPROMPTUSER.This parameter is ignored. The Save HTML Document dialog box is always displayed.

  • pvaIn
    VARIANT of type VT_BSTR that specifies the path and file name of the file to which to save the Web page. When the path contains more than one folder name, separate the folder names with two backward slashes (\\).

  • pvaOut
    Set to NULL.

The Save HTML Document dialog cannot be suppressed when calling this method from script.

Windows Internet Explorer 7 and later. The file path portion of pvaIn parameter is ignored.

IDM_SELECTALL

Selects the entire document.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_SELECTALL
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.

IDM_SIZETOCONTROL

Not supported.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_SIZETOCONTROL
Header file mshtmcid.h

 

IDM_SIZETOCONTROLHEIGHT

Not supported.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_SIZETOCONTROLHEIGHT
Header file mshtmcid.h

 

IDM_SIZETOCONTROLWIDTH

Not supported.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_SIZETOCONTROLWIDTH
Header file mshtmcid.h

 

IDM_STARTDIAGNOSTICMODE

Overwrites a horizontal line on the text selection.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_STARTDIAGNOSTICMODE
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    VARIANT which contains a SAFEARRAY containing BSTRs discussed in the comment below.

  • pvaOut
    NULL

Remarks

With Internet Explorer 11, tools can instantiate objects within a page they wish to target for the purpose of diagnosing. There are two different approaches, depending on whether tool is starting a new IE instance or attaching to a running one.

  • By a tool that is launching IE or a WWA for the purpose of debugging. In this scenario the variables should be set as part of the creation process as per-process environment variables. They should not be set as machine or user wide variables.
  • By a tool that is attaching to a running instance of IE or a WWA for the purpose of debugging. In this scenario the variables should use the IDM_STARTDIAGNOSTICSMODE OLE command target.
Environment Variable Description

JS_DM_CLSID

The CLSID of the object to be co-created by IE. The object must implement IObjectWithSetSite.

Example: {832ae882-2b23-4e55-b8fc-8f88898f97f8}

JS_DM_PATH

Optional path to the server object binary.

Example: C:\MyBinary.dll

 

All values should be set as strings not exceeding MAX_PATH in length. This feature can be disabled by the registry setting detailed below:

Key Name

\Software\Microsoft\Internet Explorer\ Main!DisableDiagnosticsMode

Type

REG_SZ

Values

Yes – This feature is disabled No – This feature is enabled (default)

 

IDM_STOP

Not supported.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_STOP
Header file mshtmcid.h

 

IDM_STRIKETHROUGH

Not supported.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_STRIKETHROUGH
Header file mshtmcid.h

 

IDM_SUBSCRIPT

Not supported.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_SUBSCRIPT
Header file mshtmcid.h

 

IDM_SUPERSCRIPT

Not supported.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_SUPERSCRIPT
Header file mshtmcid.h

 

IDM_TEXTAREA

Overwrites a multiline text input control on the text selection.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_TEXTAREA
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    VARIANT of type VT_BSTR that specifies an id attribute for the text input control. May be set to NULL or omitted.

  • pvaOut
    Set to NULL.

IDM_TEXTBOX

Overwrites a text control on the text selection.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_TEXTBOX
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    VARIANT of type VT_BSTR that specifies an id attribute for the text control. May be set to NULL or omitted.

  • pvaOut
    Set to NULL.

IDM_UNBOOKMARK

Removes any bookmark from the current selection.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_UNBOOKMARK
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.

IDM_UNDERLINE

Toggles the current selection between underlined and not underlined.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_UNDERLINE
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.

IDM_UNDO

Undo the previous command.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_UNDO
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.

This command applies to the document object. For example, the following button reverses the last action.

<button onclick="document.execCommand('Undo')">UNDO</button> 

Removes any hyperlink from the current selection.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_UNLINK
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    Set to NULL.

  • pvaOut
    Set to NULL.

IDM_UNORDERLIST

Converts the text selection into an ordered list.

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_UNORDERLIST
Header file mshtmcid.h

 

Call IOleCommandTarget::Exec with the following parameters.

  • nCmdExecOpt
    Set to OLECMDEXECOPT_DONTPROMPTUSER.

  • pvaIn
    VARIANT of type VT_BSTR that specifies an id attribute for the unordered list. May be set to NULL or omitted.

  • pvaOut
    Set to NULL.

If the previous format block is already an ordered list, this command identifier will append the current format block to that previous ordered list. If the text selection contains named objects, they are replaced by the list.

The following example converts the paragraphs of a document into a list:

var tr = document.body.createTextRange();
tr.execCommand("InsertUnorderedList", false, 'listId');