Windows 10 Make snipping tool capture after launching

Joined
Nov 17, 2009
Messages
36
Reaction score
2
I can create a batch file to launch snippingtool with the following code

Start "" "C:\windows\system32\SnippingTool.exe"

I would like to add to that a command line that selects 'NEW'
to make the tool snip ready.
I need help with that step.
 
just assign a shortcut key to the program, CRTL + F12 (or whatever you like)

xshortcuttool.png.pagespeed.gp+jp+jw+pj+js+rj+rp+rw+ri+cp+md.ic.KT9pbcvpJj.png


:user:
 
I think you missed the point - I can make the batchfile, but I can NOT make the batchfile do the 'select NEW'.
 
no, I didn't miss your point ... was merely pointing out that you can call the program up with a couple of key presses.


:user:
 
The COUPLE of presses is what I am trying to avoid - in Win7, just launching Snippingtool was enough to start capturing an image - apparently this did not get sent when I wrote it, so it now occurs 'out of order'.
 
I don't think you can do that from the command prompt, but you may be able to create a PowerShell script with "sendkeys" to simulate an ALT+N keypress:

https://technet.microsoft.com/en-us/library/ff731008.aspx

Someone else has sent me code invoking powershell - I am willing to believe his claim that is worked for him, but for me, it just launched snippingtool (the first time only) with the same need to still then click on NEW - so no improvement, but more delay.
The URL above may well have the answer to my wish/fantasy, but is way to complex for ME to apply without much more detailed guidance.
 
Could you please post the code you were sent and I'll see if I can see why that happens :).
 
First, open Notepad and paste the below PowerShell code into it (tweak the milliseconds sleep to your liking, "50" is very aggressive):

Code:
---------
add-type -AssemblyName microsoft.VisualBasic
add-type -AssemblyName System.Windows.Forms
C:\Windows\System32\SnippingTool.exe
start-sleep -Milliseconds 50
[Microsoft.VisualBasic.Interaction]::AppActivate(“Snipping Tool”)
[System.Windows.Forms.SendKeys]::SendWait(“^{n}”)
---------
Save this file as something like "snipping_tool_workaround.ps1" in your C:\Users\<username>\Documents directory (or where ever you want).

Then create a desktop shortcut with the following (replace "<username>" with your user name or full path, of course):

Code:
---------
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\Users\<username>\Documents\snipping_tool_workaround.ps1"
---------
Name the shortcut whatever you want.

Now when you double-click on that shortcut, the snipping tool opens and defaults to Ctrl-N (a new snip).
 
I've just followed those steps and it works great for me, exactly as you were hoping for :).

If the snipping tool isn't loading quick enough, the keypress might be sent too early to be caught. Could you try changing the "50" value to "300" and see if that delay lets it work for you? If so, you can keep reducing it to something lower.
 
Forums usually have an option to show satisfaction/gratitude - to say SOLVED, but I can not find it on this webpage.
 
We've got "like" buttons under posts, rather than a "solved" button - but I'm just glad that you've got it fixed :).
 
I've got the shortcut on the desktop but not sure where to insert the code.
 
I've got the shortcut on the desktop but not sure where to insert the code.

Instead of a shortcut, you need to create a file with a .ps1 extension - for example snipping.ps1. That means that when you run it, it'll be associated with PowerShell (a Windows scripting language). :)
 
Ah sorry, I see what you mean now :). I just used the original .ps1 file to run the script, I thought that's the bit you were stuck on.

I assume that you'll just need to right click the desktop, then click "new shortcut". Then, enter the following for the location:

%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\Users\<username>\Documents\snipping_tool_workaround.ps1"

You'll need to change the bit in red to the location you created the file. In Windows 10, it looks like this for me:

Capture.webp
 
Thanks, Ian. That's exactly what I did but when I double click the new icon all I get is a small black screen that lasts half a second or so before it disappears.

How do I ensure that it is a .ps1 file? Simply by calling it that?
 
Thanks, Ian. That's exactly what I did but when I double click the new icon all I get is a small black screen that lasts half a second or so before it disappears.

How do I ensure that it is a .ps1 file? Simply by calling it that?

It sounds like the ps1 file isn't launching - can you right click the ps1 file and go to properties and make sure that the filename ends in ps1 (rather than ending in .ps1.txt for example). If that's ok, can you try right clicking the ps1 file and selecting "run with powershell" to see if that is ok?
 
Back
Top