Page 1 of 1

How to judge the Cursor state in ps?

Posted: 09 Oct 2017, 08:40
by zhanglei1371
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.

Re: How to judge the Cursor state in ps?

Posted: 09 Oct 2017, 10:12
by boiler
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.

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

Posted: 09 Oct 2017, 12:42
by jeeswg
- (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