Disable script inside Windows Snipping Tool

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
submeg
Posts: 335
Joined: 14 Apr 2017, 20:39
Contact:

Disable script inside Windows Snipping Tool

16 Jun 2022, 02:18

Hi all,

I've been using the Windows Snipping Tool that @Joe Glines created using Learning One's Screen Clipping script and malcev's OCR script.

However, I have another script that I run - Sticky Keys. In a nutshell: When I hold down particular keys (Win key, CTRL, SHIFT, LButton, etc), it puts a little splash image on the left hand edge of my leftmost monitor. I use this script to help me debug if my KeyStates are stuck so I can debug my AHK to maintain / fix my scripts.

In the Windows Snipping tool, I am using the Win key + drag to take screenshots, so if I need to copy the section of the screen that contains the splash box, it is incorporated into my snip. I have opened up the Snipping tool code to see if I can disable my script prior to beginning the snip, and then turning it back on once I have finished. I do see the script turn off and then back on, but it's after I have already begun to drag my mouse, so the splash text will still be snipped.

Please see below my edits, if anyone can help me work out how to turn off the script prior to me dragging / immediately after I start dragging, that would be great!

Code: Select all


ScreenHK:

;-------------------------------------------------------------

;submeg edit 16/06/2022
;turn off sticky keys

	WinClose, Lib\StuckKeyStates.ahk ahk_class AutoHotkey
	
;-------------------------------------------------------------
	
	SCW_ScreenClip2Win(clip:=1,email:=0,OCR:=0)
	
;-------------------------------------------------------------

;submeg edit 16/06/2022
;Once the snip is finished, turn it back on.

run, %ParentPath%\AutoHotkeyU64.exe %StuckKeyStatesFullPath%			;A script that tells you when your modifiers are stuck.

;-------------------------------------------------------------
	
return


____________________________________
Check out my site, submeg.com
Connect with me on LinkedIn
Courses on AutoHotkey :ugeek:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: peter_ahk and 331 guests