Code: Select all
#s::
IfWinExist Snipping Tool
WinActivate
else
Run "c:\windows\system32\SnippingTool.exe"
WinWait, Snipping Tool,,1
ControlClick, x40 y40, Snipping Tool
return
Code: Select all
#s::
IfWinExist Snipping Tool
WinActivate
else
Run "c:\windows\system32\SnippingTool.exe"
WinWait, Snipping Tool,,1
ControlClick, x40 y40, Snipping Tool
return
Code: Select all
#s::
if WinExist( "Snipping Tool" )
{
ControlClick, x40 y40, Snipping Tool
}
else
{
Run SnippingTool.exe /clip
}
return
Code: Select all
#s::
if WinExist("Snipping Tool"){
WinActivate
Send, ^n
} else {
try
Run C:\Windows\SysNative\SnippingTool.exe
catch {
Run %A_WinDir%\System32\SnippingTool.exe
WinWaitActive, Snipping Tool
Send, ^n
}
}
return
Here is my script for accessing the Snipping Tool and Calculator easier.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
#s:: IfWinExist Snipping Tool WinActivate else Run "c:\windows\system32\SnippingTool.exe" WinWait, Snipping Tool,,1 ControlClick, x40 y40, Snipping Tool return
Code: Select all
; Quick Tools
; Fanatic Guru
; 2017 09 18
;
; Shortcuts to bring up Windows Tools
;
;{-----------------------------------------------
; Window+X Open/Activate/Minimize Windows Snipping Tool
; Window+Numpad 0 Open/Activate/Minimize Windows Calculator
;}
; INITIALIZATION - ENVIROMENT
;{-----------------------------------------------
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force ; Ensures that only the last executed instance of script is running
;}
; HOTKEYS
;{-----------------------------------------------
;
#x:: ; <-- Open/Activate/Minimize Windows Snipping Tool
{
SetTitleMatchMode, % (Setting_A_TitleMatchMode := A_TitleMatchMode) ? "RegEx" :
if WinExist("ahk_class Microsoft-Windows-.*SnipperToolbar")
{
WinGet, State, MinMax
if (State = -1)
{
WinRestore
Send, ^n
}
else if WinActive()
WinMinimize
else
{
WinActivate
Send, ^n
}
}
else if WinExist("ahk_class Microsoft-Windows-.*SnipperEditor")
{
WinGet, State, MinMax
if (State = -1)
WinRestore
else if WinActive()
WinMinimize
else
WinActivate
}
else
{
Run, snippingtool.exe
if (SubStr(A_OSVersion,1,2)=10)
{
WinWait, ahk_class Microsoft-Windows-.*SnipperToolbar,,3
Send, ^n
}
}
SetTitleMatchMode, %Setting_A_TitleMatchMode%
return
}
#numpad0:: ; <-- Open/Activate/Minimize Windows Calculator
{
if WinExist("Calculator ahk_class CalcFrame") or WinExist("Calculator ahk_class ApplicationFrameWindow")
if WinActive()
WinMinimize
else
WinActivate
else
Run calc.exe
return
}
;}
yes i am on windows 10 and even this code is not working because the win + S brings up Cortana search box.iseahound wrote:Windows 7/10 compatible
If you're on windows 10, the built in hotkey is #+s.Code: Select all
#s:: if WinExist("Snipping Tool"){ WinActivate Send, ^n } else { try Run C:\Windows\SysNative\SnippingTool.exe catch { Run %A_WinDir%\System32\SnippingTool.exe WinWaitActive, Snipping Tool Send, ^n } } return
Same problem ... win+S brings up Cortana search box, not Snipping Tool.JoeWinograd wrote:This thread at another forum where I participate may help you:
Restore Windows 7 Snipping Tool function to Windows 10
Regards, Joe
You need to make sure you have the ability to create any hotkey with win+s.seriously5OH wrote:JoeWinograd wrote:Same problem ... win+S brings up Cortana search box, not Snipping Tool.
Code: Select all
#s::
MsgBox Yes
return
Yes.Control + Shift + S::
will this work?
Code: Select all
Control+Shift+s::
if WinExist("Snipping Tool"){
WinActivate
Send, ^n
} else {
try
Run C:\Windows\SysNative\SnippingTool.exe
catch {
Run %A_WinDir%\System32\SnippingTool.exe
WinWaitActive, Snipping Tool
Send, ^n
}
}
return
Code: Select all
^+s::
Users browsing this forum: filipemb and 392 guests