Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Cursor Location (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Setting databasefile at runtime
Next thread: List of Apple processes?


Re: RB Company.   -   Rubber Chicken Software Co.
  Cursor Location   -   Paul Young
   Re: Cursor Location   -   Arnaud Nicolet
   Re: Cursor Location   -   Arnaud Nicolet
   Re: Cursor Location   -   Joe Huber
   Re: Cursor Location   -   Paul Young
    Re: Cursor Location   -   Joe Strout
   Re: Cursor Location   -   Arnaud Nicolet
   Re: Cursor Location   -   Paul Young
   Re: Cursor Location   -   Craig A. Finseth
   Re: Cursor Location   -   Paul Young
   Re: Cursor Location   -   Steve Hutson
   Re: Cursor Location   -   Paul Young
   Re: Cursor Location   -   Terry Ford
   Re: Cursor Location   -   Paul Young
   Re: Cursor Location   -   Paul Young
   Re: Cursor Location   -   Terry Ford
   Re: Cursor Location   -   Terry Ford

Cursor Location
Date: 05.08.09 02:52 (Tue, 4 Aug 2009 21:52:58 -0400)
From: Paul Young
How would one find the insert cursor (not mouse) location (x, y) on a
display?

Thanks,

Paul Young, Mac initially, any RB version up to present

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 17:30 (Wed, 05 Aug 2009 18:30:07 +0200)
From: Arnaud Nicolet
Le 5 août 09 à 17:32, Joe Huber a écrit:

> I wonder if you could take the brute force approach and do
> graphical pattern recognition on the whole screen and look for the
> blinking insertion point??? Take several screen captures and look
> for focus rings or differences between frames that look like the
> insertion cursor.

Hmm... it might be difficult, indeed.

First, if you take shorter or longer periods of screenshots than the
blink period, you won't have changes. Then you have to take
continuous screenshots and compare them at the same moment.

Then, if you want to compare a picture of, say, 1680x1050 (my current
configuration), imagine how long it would take to do it.

Finally, what if the "editfield" (or equivalent) that has the focus
is out of the screen (the window has been moved down the screen and
only the title bar is visible)? Or it's a custom control, like we can
do with a canvas in RB, and it has a different insert point (or no
insert point visible)?

I don't think I'd try that way (I think it's not doable, simply).
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 17:23 (Wed, 05 Aug 2009 18:23:45 +0200)
From: Arnaud Nicolet
Le 5 août 09 à 17:15, Paul Young a écrit:

> Arnaud,
>
> Thanks. I'm surprised that this is so difficult in RB. Maybe
> something will turn up.

There are things that aren't doable or hard to do in RB (kext files
and preferences panes come to mind). It's certainly because RS isn't
focusing on these formats. It's sometimes a shame.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 16:32 (Wed, 5 Aug 2009 08:32:39 -0700)
From: Joe Huber
At 10:24 PM -0400 8/4/09, Paul Young wrote:
>it could be in a Word document, an HTML window, etc. I'm looking
>for a way to know where the cursor is on the display, independent on
>the window (it could even be the desktop for example).

This might be doable within a single RB application, but to do it
across multiple heterogenous applications will be much more complex,
if not impossible.

Seems to me you're actually asking a series of questions:

- Which app is activated or which window is front most
- Does a control within that app have keyboard focus
- If not, is any item within that app Selected

You may be able to query the window manager to learn which window is
activated. But then you'll have to figure out a way to ask each app
the other questions.

I wonder if you could take the brute force approach and do graphical
pattern recognition on the whole screen and look for the blinking
insertion point??? Take several screen captures and look for focus
rings or differences between frames that look like the insertion
cursor.

Hope this helps,
Joe Huber

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 16:15 (Wed, 5 Aug 2009 11:15:10 -0400)
From: Paul Young
Arnaud,

Thanks. I'm surprised that this is so difficult in RB. Maybe
something will turn up.

Paul Young, CSoM

On Aug 5, 2009, at 8:44 AM, Arnaud Nicolet wrote:

> Le 5 août 09 à 14:34, Paul Young a écrit:
>
>> Craig,
>>
>> My apps provide a magnified view of a portion of the display so I
>> have no way to track the changes you mention.
>>
>> Other utilities use this information but I have not found a way to
>> keep track of where the "blinking cursor" is on the display.
>
> I guess it's not doable in RB. It would require something like a
> "kext" (kernel extension) file or something like that.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 17:02 (Wed, 05 Aug 2009 10:02:02 -0600)
From: Joe Strout
Paul Young wrote:

> Thanks. I'm surprised that this is so difficult in RB. Maybe something
> will turn up.

It's not that it is so difficult in RB. It is so difficult, period.
Try asking the same question on a Cocoa or .NET forum, and I'm sure
you'll get the same answer. What you're asking for requires deep and
atypical integration with the OS.

Best,
- Joe

Re: Cursor Location
Date: 05.08.09 13:44 (Wed, 05 Aug 2009 14:44:42 +0200)
From: Arnaud Nicolet
Le 5 août 09 à 14:34, Paul Young a écrit:

> Craig,
>
> My apps provide a magnified view of a portion of the display so I
> have no way to track the changes you mention.
>
> Other utilities use this information but I have not found a way to
> keep track of where the "blinking cursor" is on the display.

I guess it's not doable in RB. It would require something like a
"kext" (kernel extension) file or something like that.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 13:34 (Wed, 5 Aug 2009 08:34:16 -0400)
From: Paul Young
Craig,

My apps provide a magnified view of a portion of the display so I have
no way to track the changes you mention.

Other utilities use this information but I have not found a way to
keep track of where the "blinking cursor" is on the display.

Thanks anyway for your response.

Paul Young, CSoM
http://customsolutionsofmaryland.50megs.com



On Aug 5, 2009, at 8:07 AM, Craig A. Finseth wrote:

> You could try tracking the changes to the coordinates after
> mouseclicks or your starting selection, where you *do* know the x,y
> from RB functions. You would then have to track anything that might
> change the selection, and convert to pixels that you add to and
> subtract from the stored starting coordinates.
>
> Of course, you need to track line wraps, character widths, line
> heights, etc., which may or may not be straightforward in your case.
>
> Concepts like "selection" and to some extent "focus" are OS-level, but
> are part of the per-application UI code. Yes, there are conventions
> that guide us in using the system, but they are not part of the
> system.
>
> Take a simple example: an RB window for playing checkers. I select a
> checker to move it. The program indicates the selection by, say,
> changing the color of the piece. Simple, done a thousand times a day.
>
> How is your program going to know about this program's method of
> selecting?
>
> Craig

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 23.03.01 18:33 (Wed, 5 Aug 2009 07:07:02 -0500 (CDT))
From: Craig A. Finseth
You could try tracking the changes to the coordinates after
mouseclicks or your starting selection, where you *do* know the x,y
from RB functions. You would then have to track anything that might
change the selection, and convert to pixels that you add to and
subtract from the stored starting coordinates.

Of course, you need to track line wraps, character widths, line
heights, etc., which may or may not be straightforward in your case.

Concepts like "selection" and to some extent "focus" are OS-level, but
are part of the per-application UI code. Yes, there are conventions
that guide us in using the system, but they are not part of the system.

Take a simple example: an RB window for playing checkers. I select a
checker to move it. The program indicates the selection by, say,
changing the color of the piece. Simple, done a thousand times a day.

How is your program going to know about this program's method of selecting?

Craig

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 12:38 (Wed, 5 Aug 2009 07:38:01 -0400)
From: Paul Young
Steve,

OK, thanks for the input. I thought there might be a property that I
overlooked that could provide this.

Paul Young

On Aug 5, 2009, at 1:19 AM, Steve Hutson wrote:

> Hi Paul,
>
> You could try tracking the changes to the coordinates after
> mouseclicks or your starting selection, where you *do* know the x,y
> from RB functions. You would then have to track anything that might
> change the selection, and convert to pixels that you add to and
> subtract from the stored starting coordinates.
>
> Of course, you need to track line wraps, character widths, line
> heights, etc., which may or may not be straightforward in your case.
>
> Just a Rube Goldberg style idea... ;-)
>
> Best wishes,
>
> Steve
>
> Stephen E. Hutson
> AquilaDigital Partnership
> [www.aquiladigital.us]
>
> Sent from my iPod
>
> On Aug 4, 2009, at 10:01 PM, Paul Young <<email address removed>> wrote:
>
>> If I could determine where the current point of focus is, I could
>> adjust the area being magnified and displayed in the Display Window

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 06:19 (Wed, 5 Aug 2009 00:19:52 -0500)
From: Steve Hutson
Hi Paul,

You could try tracking the changes to the coordinates after
mouseclicks or your starting selection, where you *do* know the x,y
from RB functions. You would then have to track anything that might
change the selection, and convert to pixels that you add to and
subtract from the stored starting coordinates.

Of course, you need to track line wraps, character widths, line
heights, etc., which may or may not be straightforward in your case.

Just a Rube Goldberg style idea... ;-)

Best wishes,

Steve

Stephen E. Hutson
AquilaDigital Partnership
[www.aquiladigital.us]

Sent from my iPod

On Aug 4, 2009, at 10:01 PM, Paul Young <<email address removed>> wrote:

> If I could determine where the current point of focus is, I could
> adjust the area being magnified and displayed in the Display Window

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 04:01 (Tue, 4 Aug 2009 23:01:07 -0400)
From: Paul Young
I have two apps that could use this information to good effect.
Computer Glasses and Point N See (at httm://
customsolutionsolutionsofmaryland.50megs.com/) provide a magnified
view of the display around the mouse. If I could determine where the
current point of focus is, I could adjust the area being magnified and
displayed in the Display Window. As an example, you could imagine a
user with poor vision trying to fill out a form, using the tab key to
step between fields. The Display Window would follow where the user
is tabbing without moving the mouse.

These two apps magnify only a portion of the display, not the entire
display (zoom effect).

Paul Young, CSoM



On Aug 4, 2009, at 10:31 PM, Terry Ford wrote:

>
> On Aug 4, 2009, at 7:27 PM, Paul Young wrote:
>
>> Terry,
>>
>> Yes, I want the X, Y position on the display, totally independent
>> of what is beneath the cursor (the mouse could be at the other end
>> of the display for example so mouse position is not what I want).
>
> Good luck. I don't think Rb can get that for you directly. This is a
> request I have never seen before. What purpose do you have in mind?
> There may be a solution but it is beyond my scope.
>
> Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 03:31 (Tue, 4 Aug 2009 19:31:31 -0700)
From: Terry Ford

On Aug 4, 2009, at 7:27 PM, Paul Young wrote:

> Terry,
>
> Yes, I want the X, Y position on the display, totally independent of
> what is beneath the cursor (the mouse could be at the other end of
> the display for example so mouse position is not what I want).

Good luck. I don't think Rb can get that for you directly. This is a
request I have never seen before. What purpose do you have in mind?
There may be a solution but it is beyond my scope.

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 03:27 (Tue, 4 Aug 2009 22:27:03 -0400)
From: Paul Young
Terry,

Yes, I want the X, Y position on the display, totally independent of
what is beneath the cursor (the mouse could be at the other end of the
display for example so mouse position is not what I want).

Paul Young

On Aug 4, 2009, at 10:22 PM, Terry Ford wrote:

>
> On Aug 4, 2009, at 7:18 PM, Terry Ford wrote:
>
>>
>> On Aug 4, 2009, at 6:52 PM, Paul Young wrote:
>>
>>> How would one find the insert cursor (not mouse) location (x, y)
>>> on a display?
>>
>> If it's in an Editfield (TextField) it would be Editfield.SelStart.
>> This is both settable and readable.
>
> Hmm. You want the X,Y position? I don't think that's so easy.
> There's EditField.CharPosAtXY Method but that's the opposite of what
> you might want.
>
> Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 03:24 (Tue, 4 Aug 2009 22:24:49 -0400)
From: Paul Young
Terry,

Yes, but it could be in a Word document, an HTML window, etc. I'm
looking for a way to know where the cursor is on the display,
independent on the window (it could even be the desktop for example).

Thanks for your response.

Paul Young

On Aug 4, 2009, at 10:18 PM, Terry Ford wrote:

>
> On Aug 4, 2009, at 6:52 PM, Paul Young wrote:
>
>> How would one find the insert cursor (not mouse) location (x, y) on
>> a display?
>
> If it's in an Editfield (TextField) it would be Editfield.SelStart.
> This is both settable and readable.
>
> HTH
>
> Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 03:22 (Tue, 4 Aug 2009 19:22:19 -0700)
From: Terry Ford

On Aug 4, 2009, at 7:18 PM, Terry Ford wrote:

>
> On Aug 4, 2009, at 6:52 PM, Paul Young wrote:
>
>> How would one find the insert cursor (not mouse) location (x, y) on
>> a display?
>
> If it's in an Editfield (TextField) it would be Editfield.SelStart.
> This is both settable and readable.

Hmm. You want the X,Y position? I don't think that's so easy. There's
EditField.CharPosAtXY Method but that's the opposite of what you might
want.

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Cursor Location
Date: 05.08.09 03:18 (Tue, 4 Aug 2009 19:18:46 -0700)
From: Terry Ford

On Aug 4, 2009, at 6:52 PM, Paul Young wrote:

> How would one find the insert cursor (not mouse) location (x, y) on
> a display?

If it's in an Editfield (TextField) it would be Editfield.SelStart.
This is both settable and readable.

HTH

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>