Snipping Tool (default to new snip)

Get help with using AutoHotkey and its commands and hotkeys
seriously5OH

Snipping Tool (default to new snip)

13 Jun 2018, 10:47

I found the following AHK code online at TenForums. It does not work. Any suggestions on making this code work to automatically open Snipping Tool and execute the New Snip function with one keyboard shortcut?

Code: [Select all] [Download] (Untitled.ahk)GeSHi © Codebox Plus

#s::
IfWinExist Snipping Tool
WinActivate
else
Run "c:\windows\system32\SnippingTool.exe"
WinWait, Snipping Tool,,1
ControlClick, x40 y40, Snipping Tool
return
User avatar
TLM
Posts: 1315
Joined: 01 Oct 2013, 07:52

Re: Snipping Tool (default to new snip)

13 Jun 2018, 15:46

this works for me

Code: [Select all] [Download] GeSHi © Codebox Plus

#s::
if WinExist( "Snipping Tool" )
{
ControlClick, x40 y40, Snipping Tool
}
else
{
Run SnippingTool.exe /clip
}
return
JoeWinograd
Posts: 970
Joined: 10 Feb 2014, 20:00

Re: Snipping Tool (default to new snip)

13 Jun 2018, 16:03

This thread at another forum where I participate may help you:
Restore Windows 7 Snipping Tool function to Windows 10
Regards, Joe
iseahound
Posts: 235
Joined: 13 Aug 2016, 21:04
GitHub: iseahound

Re: Snipping Tool (default to new snip)

13 Jun 2018, 16:13

Windows 7/10 compatible

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



If you're on windows 10, the built in hotkey is #+s.
FanaticGuru
Posts: 1119
Joined: 30 Sep 2013, 22:25

Re: Snipping Tool (default to new snip)

13 Jun 2018, 16:19

seriously5OH wrote:I found the following AHK code online at TenForums. It does not work. Any suggestions on making this code work to automatically open Snipping Tool and execute the New Snip function with one keyboard shortcut?

Code: [Select all] [Download] (Untitled.ahk)GeSHi © Codebox Plus

#s::
IfWinExist Snipping Tool
WinActivate
else
Run "c:\windows\system32\SnippingTool.exe"
WinWait, Snipping Tool,,1
ControlClick, x40 y40, Snipping Tool
return

Here is my script for accessing the Snipping Tool and Calculator easier.

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus


FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts

AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon

Google Search, Dictionary, Thesaurus - Quickly Get Information from Specific Web Resources

[Function] Timer - Create and Manage Timers
seriously5OH

Re: Snipping Tool (default to new snip)

14 Jun 2018, 08:01

None of them work for me because WIN+S keeps bringing up Cortana search bar.
seriously5OH

Re: Snipping Tool (default to new snip)

14 Jun 2018, 12:12

iseahound wrote:Windows 7/10 compatible

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



If you're on windows 10, the built in hotkey is #+s.


yes i am on windows 10 and even this code is not working because the win + S brings up Cortana search box.
seriously5OH

Re: Snipping Tool (default to new snip)

14 Jun 2018, 15:25

JoeWinograd wrote:This thread at another forum where I participate may help you:
Restore Windows 7 Snipping Tool function to Windows 10
Regards, Joe


Same problem ... win+S brings up Cortana search box, not Snipping Tool.
JoeWinograd
Posts: 970
Joined: 10 Feb 2014, 20:00

Re: Snipping Tool (default to new snip)

14 Jun 2018, 16:41

Either stop Win+S from being a Cortana keyboard shortcut (a web search will show you how) or use another hotkey for the Snipping Tool. Note this comment at the link I gave you:

"Use whatever hotkey you want (the code above makes Win-S the Snipping Tool hotkey)."

Regards, Joe
FanaticGuru
Posts: 1119
Joined: 30 Sep 2013, 22:25

Re: Snipping Tool (default to new snip)

14 Jun 2018, 17:11

seriously5OH wrote:
JoeWinograd wrote:Same problem ... win+S brings up Cortana search box, not Snipping Tool.
You need to make sure you have the ability to create any hotkey with win+s.

You can test with this.

Code: [Select all] [Download] (Untitled.ahk)GeSHi © Codebox Plus

#s::
MsgBox Yes
return
For the record I have no problem making a win+s hotkey in Windows 10.

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts

AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon

Google Search, Dictionary, Thesaurus - Quickly Get Information from Specific Web Resources

[Function] Timer - Create and Manage Timers
seriously5OH

Re: Snipping Tool (default to new snip)

15 Jun 2018, 13:01

It's my work computer at a large corporation. They won't let me do anything that requires admin login. Disabling the windows key requires admin. I will just choose another key combination. Thanks guys.

Control + Shift + S::
will this work?
JoeWinograd
Posts: 970
Joined: 10 Feb 2014, 20:00

Re: Snipping Tool (default to new snip)

15 Jun 2018, 13:28

Control + Shift + S::
will this work?
Yes.
seriously5OH

Re: Snipping Tool (default to new snip)

15 Jun 2018, 14:11

Error at line 6.

Line Text: Control+Shift+s::
Error: Invalid hotkey

The program will exit.

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus

JoeWinograd
Posts: 970
Joined: 10 Feb 2014, 20:00

Re: Snipping Tool (default to new snip)

15 Jun 2018, 14:28

You need to learn the correct syntax for keys and modifiers, which are documented here:
https://autohotkey.com/docs/KeyList.htm
https://autohotkey.com/docs/Hotkeys.htm#Symbols

After studying that, you'll know that the first line in your script should be this:


Regards, Joe
seriously5OH

Re: Snipping Tool (default to new snip)

15 Jun 2018, 15:06

Ok i actually had looked at the first document. But now that i've done some reading on the second document i am on board. :) thanks for the help as i learn this program.

Thanks to all.

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot], jojo mc jojo, RickC, supplementfacts and 49 guests