Page 1 of 2

Cursor visibility problem

Posted: Thu May 02, 2024 11:43 am
by CAsba
Hi all,
I've been having problems seeing/locating the cursor when editing scripts - old eyes are easily challenged! I took a look in the dictionary and tried importing a solid black arrow. I restarted LC and the black arrow was great - BUT, the arrow and script froze, so I closed down without saving and opened last night's copy of my project. Looking closer in the dictionary, it does state desktop - no mention of laptop - so as I'm working on a laptop maybe that's the prob. Does anyone have expertise in this area, both to confirm or reject the desktop/laptop possible cause, and to offer any other way to get a more visible cursor?

Re: Cursor visibility problem

Posted: Thu May 02, 2024 11:56 am
by Klaus
Hi CAsba,

desktop also means laptop! :-)
The opposite of "desktop" is mobile and html (web).

However setting the "cursor" to any graphic should not crash your machine,
as long as the image meets theses requirements:
Windows XP and above support full alpha-blended cursors up to 64x64
More recent Linux distributions support alpha-blended cursors up to a size of 64x64
Mac OS X supports alpha-blended cursors up to 256x256
What OS and LC version are you using?


Best

Klaus

Re: Cursor visibility problem

Posted: Thu May 02, 2024 1:08 pm
by CAsba
Hi Klaus,
It's a Windows laptop, Win11., so it should be ok....BUT
Currently the situation is that the cursor varies between a heavy black I-beam and the default cursor. I also tried changing the cursor in Windows, but that does not affect LC. it's no worse now than what it was before, but I was hoping to get a more visible - permanent - cursor.

Re: Cursor visibility problem

Posted: Thu May 02, 2024 1:53 pm
by Klaus
Hm, how and when did/do you set the cursor in LC?

Re: Cursor visibility problem

Posted: Thu May 02, 2024 2:07 pm
by dunbarx
CAsba.

You can write a little ditty in the stack script like:

Code: Select all

on mouseUp
   if the optionKey is down then set the screenMouseLoc to  the loc of this stack
end mouseUp
Now just click with optionKey and the cursor will appear at the center of the card window.


Craig

Re: Cursor visibility problem

Posted: Thu May 02, 2024 2:11 pm
by richmond62
Here is something to amuse yourself with:
-
Screenshot 2024-05-02 at 16.09.07.png

Re: Cursor visibility problem

Posted: Thu May 02, 2024 2:45 pm
by CAsba
Thanks everyone, great stuff.
Klaus,
Having shut down and restarted LC it now appears that I have a stable bold black arrow to navigate with - just what I needed.
Thanks for your kind interest.

Re: Cursor visibility problem

Posted: Thu May 02, 2024 2:56 pm
by dunbarx
CAsba.

Good, Just so you know, you can also:

Code: Select all

if the optionKey is down then set the screenMouseLoc to  the loc of  stack "revNewScriptEditor 1"
which will place the cursor in the center of the SE.

Craig

Re: Cursor visibility problem

Posted: Fri May 03, 2024 1:46 am
by jacque
CAsba wrote:
Thu May 02, 2024 2:45 pm
Having shut down and restarted LC it now appears that I have a stable bold black arrow to navigate with - just what I needed.
I'm curious how you solved it. Did you set the defaultCursor? I had a stack that needed to use a custom cursor throughout and I ended up editing the arrow image in the revMacCursors stack. I think the Windows cursors stack is just called revCursors.

Re: Cursor visibility problem

Posted: Wed May 08, 2024 11:31 am
by CAsba
Hi Jacque,
I'm afraid my 'solution' did not last. For some reason - possibly after shutdown/startup - the cursor reverted to its previous hardly visible state whilst in the script and in the IDE, but changes to large and black only in the yellow headers. So, sorry if I misled you there. I tried again, and got I-beam in bold in the script panel - but hardly visible arrow in the IDE, then for some reason the I-beam reverted to the hardly visible arrow. So, I gave up ! It would be good to even change the colour - say, RED, but I don't think that's a possibility.

Re: Cursor visibility problem

Posted: Wed May 08, 2024 1:39 pm
by richmond62
Custom cursor images must contain three colors: black, white, and a transparent color.
I wonder why?

Re: Cursor visibility problem

Posted: Wed May 08, 2024 3:11 pm
by CAsba
Hi,
Following your hint I looked some more and found some coding that I put into a button but it didn't do anything.

Code: Select all

set the lockCursor to true  -- locking the cursor gives *you* control of the cursor from the system. So that you can set the icon.
set the cursor to hand
set the lockCursor to false  -- returns the cursor back to the system.
Any help would be much appreciated.

Re: Cursor visibility problem

Posted: Wed May 08, 2024 3:24 pm
by richmond62
Probably it is a better idea to change the cursor to what you want FIRST, and then set the lockCursor to true SECOND. 8)


Click on the big hand!

Re: Cursor visibility problem

Posted: Fri May 10, 2024 3:00 pm
by CAsba
Thanks. The hand is great. I haven't figured out how to keep it in my stack - it works for a while then reverts to normal cursor and I have to run the code again to get it back. How can I make it permanent ?

Re: Cursor visibility problem

Posted: Fri May 10, 2024 5:27 pm
by dunbarx
CAsba.

There seems to be a bug in LC where "lock cursor" breaks in a number of situations. But if you:

Code: Select all

set the defaultCursor to "yourCursorStyle"
the new cursor will stick everywhere. This property can be changed at will, and from any source.

Craig