How to judge the Cursor state in ps? Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
Posts: 22
Joined: 05 Aug 2014, 02:01

How to judge the Cursor state in ps?

09 Oct 2017, 08:40

I want to judge whether the cursor is in state of inputing,so I use the code below:

Code: Select all

#if A_cursor="IBeam"
y::sendinput testword!
But I found it didn't work in photoshop cs6.
So I want know how to judge the cursor's state,if in input state ,do action 1,else,do action 2.
Also in Office 2003,or other programe.
Is there a universal Method to solve this problem?
Thx everyone.
User avatar
Posts: 6085
Joined: 21 Dec 2014, 02:44

Re: How to judge the Cursor state in ps?

09 Oct 2017, 10:12

Note that the basic premise is flawed regardless of the program. The cursor being an IBeam in any program does not necessarily mean that the control that accepts text has focus. It just means your mouse cursor is hovering over it. The control can be active and ready to accept text even when your mouse cursor is outside that control and is no longer an IBeam. Similarly, some other control could be active while your mouse is hovering over the one that accepts text (and thus is an IBeam), but typing will not enter text into that control.
User avatar
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: How to judge the Cursor state in ps?  Topic is solved

09 Oct 2017, 12:42

- (As you mentioned.) Check the value of A_Cursor.
- See if any text on the screen changes and see if you can retrieve this with AccViewer.
Acc library (MSAA) and AccViewer download links - AutoHotkey Community
- See if some text/image changes and use ImageSearch.
- Try ControlGetFocus.
- Retrieve the image of the cursor, and compare it against another image.
identify cursor pointers - AutoHotkey Community
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask For Help”

Who is online

Users browsing this forum: Hackerxd, haggyy, mikeyww, Pulover, XMCQCX and 88 guests