Skip to content

Commit 16a2579

Browse files
committed
PR comments
1 parent 7efea0b commit 16a2579

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

hub/apps/develop/launch/launch-snipping-tool.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
22
title: Launch Snipping Tool
3-
description: This topic describes how to use the new protocol launch framework for Snipping Tool. Your app can use these URI schemes to launch the Snipping Tool capture overlay to create a new snip or recording.
3+
description: This topic describes how to use the new protocol launch framework for Snipping Tool. Your app can use these URI schemes to launch Snipping Tool's capture overlay to create a new snip or recording.
44
ms.date: 02/14/2025
55
ms.topic: concept-article
66
keywords: windows 11, uri, snipping tool, capture
77
ms.localizationpriority: medium
88
ms.custom: RS5
9-
# customer-intent: As a Windows developer, I want to learn about the ms-screenclip URI scheme so that I can integrate it into my application to programmatically launch the Snipping Tool. This will allow my application to trigger a snip experience directly, enabling users to take screenshots seamlessly without manually opening the Snipping Tool.
9+
# customer-intent: As a Windows developer, I want to learn about the ms-screenclip URI scheme so that I can integrate it into my application to programmatically launch Snipping Tool. This will allow my application to trigger a snip experience directly, enabling users to take screenshots seamlessly without manually opening Snipping Tool.
1010
---
1111

1212
# Launch Snipping Tool
1313

14-
This article specifies the protocol for integrating first and third-party applications with the Windows Snipping Tool using the **ms-screenclip:** URI (Uniform Resource Identifier) scheme. The protocol facilitates the capture of images and video (with audio) via the Snipping Tool. App callers can customize and choose which Snipping Tool features their app will display. The protocol is designed to offer flexibility, security, and ease of use, aligning closely with familiar HTTP-based interactions. This shift can make the protocol more intuitive for developers and facilitate its integration with web technologies.
14+
This article specifies the protocol for integrating first and third-party applications with the Windows Snipping Tool using the **ms-screenclip:** URI (Uniform Resource Identifier) scheme. The protocol facilitates the capture of images and video (with audio) via Snipping Tool. App callers can customize and choose which Snipping Tool features their app will display. The protocol is designed to offer flexibility, security, and ease of use, aligning closely with familiar HTTP-based interactions. This shift can make the protocol more intuitive for developers and facilitate its integration with web technologies.
1515

1616
> [!NOTE]
1717
> This protocol launch replaces the previous existing experience documented [here](launch-screen-snipping.md).
1818
1919
## Supported features
2020

21-
The Snipping Tool protocol supports the following features:
21+
sSnipping Tool protocol supports the following features:
2222

2323
- Rectangle Capture
2424
- Freeform Capture
@@ -33,8 +33,8 @@ The Snipping Tool protocol supports the following features:
3333

3434
**ms-screenclip:** takes the following parameters:
3535

36-
- **Scheme:** `ms-screenclip` - The custom scheme for the Snipping Tool protocol.
37-
- **Host:** Defines the Snipping Tool operation to perform (`capture` for snipping and recording, `discover` for querying capabilities)..
36+
- **Scheme:** `ms-screenclip` - The custom scheme for Snipping Tool's protocol.
37+
- **Host:** Defines the Snipping Tool operation to perform (`capture` for snipping and recording, `discover` for querying capabilities).
3838
- **Path:** Specifies the media type to capture, such as an image (`/image`) or video (`/video`).
3939
- **Query:** Parameters for the specified schema.
4040

@@ -60,16 +60,16 @@ The Snipping Tool protocol supports the following features:
6060
| `host` | string (enum) | yes | Specifies the **Snipping Tool action** to perform. Supported values: <br>- `capture` – Opens Snipping Tool to take a screenshot or recording. <br>- `discover` – Queries supported features. | `capture` |
6161
| `path` | string (enum) | yes | Specifies the **type of media** being captured: <br>- `image` – Screenshot capture. <br>- `video` – Screen recording. | n/a |
6262
| `enabledModes` | string (list) | no | Controls which snipping or recording modes are **enabled** in the UI. <br> - `RectangleSnip` <br> - `WindowSnip` <br> - `FreeformSnip` <br> - `RectangleRecord` <br> - `SnippingAllModes` (all image modes) <br> - `RecordAllModes` (all recording modes) <br> - `All` (all supported modes) | Defaults to the mode specified in the URI (`path`) |
63-
| `auto-save` | boolean | no | Determines if the captured **Snip or Recording** should be **automatically saved** to the user's device. If `false`, the file is stored temporarily for retrieval via a token. | `false` |
63+
| `auto-save` | boolean | no | Determines if the captured **Screenshot or Recording** should be **automatically saved** to the user's device. If `false`, the file is stored temporarily for retrieval via a token. | `false` |
6464
| `redirect-uri` | URI | yes | Callback URI where the **Snipping Tool response** will be sent. Applications must register a handler for this protocol. | n/a |
6565

6666
### Discover Host
6767

68-
The Snipping Tool protocol supports a `discover` endpoint that allows applications to retrieve available features, supported modes, and protocol versions dynamically. This is useful for ensuring compatibility with future updates or querying what capture methods are available.
68+
Snipping Tool protocol supports a `discover` endpoint that allows applications to retrieve available features, supported modes, and protocol versions dynamically. This is useful for ensuring compatibility with future updates or querying what capture methods are available.
6969

7070
### How to Use
7171

72-
To retrieve the Snipping Tool's supported capabilities, use the following URI:
72+
To retrieve Snipping Tool's supported capabilities, use the following URI:
7373

7474
`ms-screenclip://discover?redirect-uri=my-snip-protocol-test-app://response`
7575

@@ -109,10 +109,10 @@ The response is a JSON object containing:
109109

110110
## EnabledModes
111111

112-
The enabledModes parameter is designed to give developers granular control over the available UI options when invoking the ms-screenclip protocol. This allows for a tailored user experience that matches the specific requirements of the calling application. By specifying the enabledModes parameter, developers can restrict the user's choices in the Snipping Tool UI to ensure the output format meets their expectations.
112+
The **enabledModes** parameter is designed to give developers granular control over the available UI options when invoking the ms-screenclip protocol. This allows for a tailored user experience that matches the specific requirements of the calling application. By specifying the **enabledModes** parameter, developers can restrict the user's choices in Snipping Tool's UI to ensure the output format meets their expectations.
113113

114114
> [!NOTE]
115-
> The FullScreenSnip mode is not supported in interactive mode at this time and should not be included in the enabledModes parameter.
115+
> The FullScreenSnip mode is not supported in interactive mode at this time and should not be included in the **enabledModes** parameter.
116116
117117
### Supported modes
118118

@@ -121,70 +121,70 @@ The **enabledModes** parameter can accept the following modes:
121121
- **RectangleSnip:** Enables rectangle capture mode.
122122
- **WindowSnip:** Enables window capture mode.
123123
- **FreeformSnip:** Enables freeform capture mode.
124+
- **SnippingAllModes:** Enables all snipping (image capture) modes (RectangleSnip, WindowSnip, FreeformSnip).
124125
- **RectangleRecord:** Enables rectangle recording mode.
125126
- **RecordAllModes:** Enables all recording modes (currently only RectangleRecord is available).
126-
- **SnippingAllModes:** Enables all snipping (image capture) modes (RectangleSnip, WindowSnip, FreeformSnip).
127127
- **All:** Enables all supported modes (RectangleSnip, WindowSnip, FreeformSnip, RectangleRecord).
128128

129129
> [!IMPORTANT]
130-
> If the **enabledModes** parameter is is omitted, the Snipping Tool will default to the mode explicitly specified in the URI (e.g., `rectangle`, `freeform`).
130+
> If the **enabledModes** parameter is omitted, Snipping Tool will default to the mode explicitly specified in the URI (e.g., `rectangle`, `freeform`).
131131
>
132-
> - If a mode is explicitly specified in the URI (such as rectangle), only that mode will be available in the Snipping Tool UI.
133-
> - If no mode is specified and enabledModes is also not provided, the request is considered invalid and will be ignored.
132+
> - If a mode is explicitly specified in the URI (such as rectangle), only that mode will be available in Snipping Tool's UI.
133+
> - If no mode is specified and **enabledModes** is also not provided, the request is considered invalid and will be ignored.
134134
135135
## Examples
136136

137137
### Example 1: Enable Only Rectangle Snip
138138

139139
`ms-screenclip://capture/image?rectangle&enabledModes=RectangleSnip&redirect-uri=my-snip-protocol-test-app://response`
140140

141-
_Explanation: This command launches the Snipping Tool with only the rectangle snipping option enabled. The user will only be able to select a rectangular region for capture._
141+
_Explanation: This command launches Snipping Tool's overlay with only the rectangle snipping mode enabled. The user will only be able to select a rectangular region for capture._
142142

143143
### Example 2: Enable Rectangle Snip and Window Snip
144144

145145
`ms-screenclip://capture/image?rectangle&enabledModes=RectangleSnip,WindowSnip&redirect-uri=my-snip-protocol-test-app://response`
146146

147-
_Explanation: This command launches the Snipping Tool with both the rectangle and window snipping modes enabled. The user can choose between capturing a rectangular area or an entire window._
147+
_Explanation: This command launches Snipping Tool's overlay with both the rectangle and window snipping modes enabled. The user can choose between capturing a rectangular region or an entire window._
148148

149149
### Example 3: Enable All Snipping Modes
150150

151151
`ms-screenclip://capture/image?rectangle&enabledModes=SnippingAllModes&redirect-uri=my-snip-protocol-test-app://response`
152152

153-
_Explanation: This command launches the Snipping Tool with all supported image snipping modes (RectangleSnip, WindowSnip, FreeformSnip). The FullScreenSnip mode is excluded from interactive mode and will not be enabled._
153+
_Explanation: This command launches Snipping Tool's overlay with all supported image snipping modes (RectangleSnip, WindowSnip, FreeformSnip). The FullScreenSnip mode is excluded from interactive mode and will not be enabled._
154154

155155
### Example 4: Enable Recording Mode Only
156156

157157
`ms-screenclip://capture/video?enabledModes=RecordAllModes&redirect-uri=my-snip-protocol-test-app://response`
158158

159-
_Explanation: This command launches the Snipping Tool with only the recording mode enabled. The user can only choose the rectangle recording mode._
159+
_Explanation: This command launches Snipping Tool's overlay with only the recording mode enabled. The user can only choose the rectangle region to record._
160160

161161
### Example 5: Enable Multiple Snipping and Recording Modes
162162

163-
`ms-screenclip://capture/image?enabledModes=RectangleSnip,RectangleRecord&redirect-uri=my-snip-protocol-test-app://response`
163+
`ms-screenclip://capture/image?freeform&enabledModes=RectangleSnip,RectangleRecord&redirect-uri=my-snip-protocol-test-app://response`
164164

165-
_Explanation: This command launches the Snipping Tool with both rectangle snip and rectangle recording modes available. Users can either snip a rectangle or record the selected area._
165+
_Explanation: This command launches Snipping Tool's overlay with rectangle recording, rectangle and freeform snipping modes available. Since freeform mode was specified in the URI, it will be the default pre-selected mode. Users can choose to snip in freeform, rectangle, or record a the selected region.._
166166

167167
### Example 6: Enable Rectangle Snipping Only
168168

169169
`ms-screenclip://capture/image?rectangle&redirect-uri=my-snip-protocol-test-app://response`
170170

171-
_Explanation: Since rectangle is specified in the URI, only rectangle snipping mode will be available in the Snipping Tool UI._
171+
_Explanation: Since rectangle is specified in the URI, only rectangle snipping mode will be available in Snipping Tool's UI._
172172

173173
### Example 7: No `mode` or `enabledModes` specified
174174

175175
`ms-screenclip://capture/image?redirect-uri=my-snip-protocol-test-app://response`
176176

177-
_Explanation: This request does not specify any mode, making it invalid. The Snipping Tool will ignore the call._
177+
_Explanation: This request does not specify any mode, making it invalid. Snipping Tool will ignore the call._
178178

179179
## Key considerations
180180

181181
- **Mode Restrictions:** Developers should ensure that enabling specific modes aligns with the expected behavior of their application. Restricting UI options helps maintain a consistent user experience and ensures the resulting capture matches the application's needs.
182182
- **Unsupported Modes:** The FullScreenSnip mode is not supported and should not be included in the `enabledModes` parameter.
183-
- **Default Behavior:** If no enabledModes parameter is specified, all modes (RectangleSnip, WindowSnip, FreeformSnip, RectangleRecord) are available by default.
183+
- **Default Behavior:** If no `enabledModes` parameter is specified, all modes (RectangleSnip, WindowSnip, FreeformSnip, RectangleRecord) are available by default.
184184

185185
## Security Considerations
186186

187-
Important: The Snipping Tool does not validate the redirect-uri parameter. It is the responsibility of the calling application to ensure that:
187+
Important: Snipping Tool does not validate the redirect-uri parameter. It is the responsibility of the calling application to ensure that:
188188

189189
- The `redirect-uri` points to a trusted destination.
190190
- The `redirect-uri` does not expose the captured content to unauthorized applications.
@@ -196,26 +196,26 @@ Response if expected parameters **aren't** supplied or overloaded.
196196

197197
## Responses to the caller
198198

199-
To ensure the response back to the caller via `redirect-uri` follows HTTP-based interaction principles, the response will mimic the structure of an HTTP response but will be conveyed through URI query parameters. This approach keeps the interaction web-standard compliant and familiar to developers.
199+
To ensure the response back to the caller via `redirect-uri` follows HTTP-based interaction principles, the response will mimic the structure of an HTTP response, but will be conveyed through URI query parameters. This approach keeps the interaction web-standard compliant and familiar to developers.
200200

201201
### Use of shared tokens
202202

203203
The use of the `SharedStorageAccessManager` class and of sharing tokens is subject to the following requirements and restrictions:
204204

205-
- A sharing token can only be redeemed one time. After that, the token is no longer valid.
205+
- A sharing token can only be redeemed once. After that, the token is no longer valid.
206206
- A sharing token expires after 14 days and is no longer valid.
207-
- The source app cannot provide more than one thousand sharing tokens. After a token is redeemed, removed, or expires, however, it no longer counts against the quota of the source app.
207+
- The source app cannot provide more than 1000 sharing tokens. After a token is redeemed, removed, or expires, however, it no longer counts against the quota of the source app.
208208

209209
### Response parameters
210210

211211
The following parameters are returned in the redirect URI:
212212

213-
| Parameter | Type | Description |
214-
| ------------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
215-
| Reason | String | The outcome and explanation for the snipping outcomes. |
216-
| Token (for success) | String | A token representing the captured media, which the application can use to access the file. |
217-
| code | Int | The HTTP status code equivalent to provide a more granular understanding of the outcome. |
218-
| x-request-correlation-id | String | A unique identifier value attached to requests and messages that allow reference to a particular transaction or event chain. |
213+
| Parameter | Type | Description |
214+
| ------------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
215+
| Reason | String | The outcome and explanation for the snip. |
216+
| Token (for success) | String | A token representing the captured media, which the application can use to access the file. |
217+
| code | Int | The HTTP status code equivalent to provide a more granular understanding of the outcome. |
218+
| x-request-correlation-id | String | A unique identifier value attached to requests and messages that allows reference to a particular transaction or event chain. |
219219

220220
## Retrieving a token
221221

@@ -242,7 +242,7 @@ The following table lists the status codes that can be returned in the redirect
242242

243243
## Caller example
244244

245-
Below is a table displaying examples of full URIs constructed to initiate different types of snipping sessions using the screenclip: protocol. Each URI example demonstrates a combination of parameters to illustrate how you can customize the snipping tool's behavior for different use cases.
245+
Below is a table displaying examples of full URIs constructed to initiate different types of snipping sessions using the screenclip: protocol. Each URI example demonstrates a combination of parameters to illustrate how you can customize Snipping Tool's behavior for different use cases.
246246

247247
| Use Case | Example URI | Description |
248248
| -------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |

0 commit comments

Comments
 (0)