简体   繁体   中英

AutoHotkey's MouseClickDrag issues in dealing with selecting Paint.NET images squared area?

(If you want to reproduce this example, please download Paint.NET from here , it's free and it's got more functions than Microsoft Paint).

When you open Paint.NET, load a simple image and take rectangular selection as instrument.

I've written this simple script:

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

^d::
MouseClickDrag, Left, 365, 434, 906, 460
;You can change mouse coordinates as you wish
Send, ^c
Return

Run it with Ctrl + d .

I'm not able to select the area described by those coordinates, while using the rectangular color filling instrument works fine.

It seems AutoHotkey does not highlight the area if I use the rectangular selector.

Have you got the same issue?

If SendMode Input doesn't work, Event usually does. Unfortunately, it's not as fast as Input , so playing around with SetKeyDelay may help going against that effect.
However, if you're looking for a way to manipulate images automatically, I recommend using GDI+ .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM