Hide cursor, yes, no, depends... HELP!

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

rfarnold47
Posts: 6
Joined: Sun Jan 05, 2020 5:32 am

Hide cursor, yes, no, depends... HELP!

Post by rfarnold47 »

A button script to play a series of videos will hide the cursor with:
Set cursor to none
set lockcursor to true
when the button is clicked with the mouse (its a mouseup handler)

But if I attempt to activate the script in the OpenStack handler so that it runs on startup, the cursor remains visible (everything else is fine). I have tried a variety of things, including putting the script in the stack vs the button; tried "click the mouse at" instead of "send mouseup to", tried delays... but if the script is activated at launch (OpenStack) the cursor will show. Again, it hides as intended if the button is clicked with the mouse. (but I want it to run at app launch)

Why, and possible solutions?

is there a postOpenstack?
Thanks
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx »

Hi.

There is a thread on this subject from a few weeks ago. I will try to find it when I get into my office tomorrow, but since I live in the United States, likely someone will get it for you before that.

But since you ask for a place "later" in the opening process, have you tried the card script? An openCard handler there comes, er, later.

Craig
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx »

Aha.

Check this out.
viewtopic.php?f=9&t=39099&hilit=cursor

Craig
SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 328
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Hide cursor, yes, no, depends... HELP!

Post by SWEdeAndy »

dunbarx wrote: Mon Jul 08, 2024 4:02 am But since you ask for a place "later" in the opening process, have you tried the card script? An openCard handler there comes, er, later.
Sorry, but I have to point out that it doesn't. openCard is triggered before openStack when a stack/app is opened.
[Edit] My comment above was incorrect, sorry! See below.
Last edited by SWEdeAndy on Mon Jul 08, 2024 3:20 pm, edited 2 times in total.
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10415
Joined: Fri Feb 19, 2010 10:17 am

Re: Hide cursor, yes, no, depends... HELP!

Post by richmond62 »

openCard is triggered BEFORE openStack . . .

someone, somewhere, somewhen was being deliberately obtuse, and for why forbye; and I jalouse we'll never ken.
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Hide cursor, yes, no, depends... HELP!

Post by FourthWorld »

richmond62 wrote: Mon Jul 08, 2024 10:52 am openCard is triggered BEFORE openStack . . .
Oh? Put this in a stack script, save the stack, close it, then open it.

Code: Select all

on openStack
   LogMsg the params
end openStack

on openCard
   LogMsg the params
end openCard

on LogMsg s
   put s &cr after msg
end LogMsg
A card is a member of a stack, so a stack is opened first, then the card, then any controls on the card.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 328
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Hide cursor, yes, no, depends... HELP!

Post by SWEdeAndy »

FourthWorld wrote: Mon Jul 08, 2024 11:51 am
richmond62 wrote: Mon Jul 08, 2024 10:52 am openCard is triggered BEFORE openStack . . .
Oh? Put this in a stack script, save the stack, close it, then open it.
He quoted me, so I'm the one who got it wrong. :oops: I think I confused it with the how the message path works: openStack (and AFTERWARDS openCard) go to the script of card 1 first, and then to the stack script. So if you have "on openStack" in the card script (of card 1) then it won't go up to the stack script unless you pass it. Right?
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx »

@SWEdeAndy

Hi.

We all get stuff wrong. I was a little taken aback by the red colored font, however. 8)

Craig
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10415
Joined: Fri Feb 19, 2010 10:17 am

Re: Hide cursor, yes, no, depends... HELP!

Post by richmond62 »

Well, all I can say is that I was gae glad it was you that got it wrong as I was beginning to wonder.
SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 328
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Hide cursor, yes, no, depends... HELP!

Post by SWEdeAndy »

dunbarx wrote: Mon Jul 08, 2024 2:06 pm @SWEdeAndy
We all get stuff wrong. I was a little taken aback by the red colored font, however. 8)
Haha, what a mess - sorry Craig, the red font was not there originally, it was my edit, meant to indicate that my text was incorrect (as there's no strike-thru style to apply). I could just have deleted my whole post, but then the thread would be so confusing to everyone else... :?
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10103
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Hide cursor, yes, no, depends... HELP!

Post by FourthWorld »

SWEdeAndy wrote: Mon Jul 08, 2024 12:13 pm So if you have "on openStack" in the card script (of card 1) then it won't go up to the stack script unless you pass it. Right?
I'm not sure I understand the question. Any handler that handles a message would need to pass it for others further in in the message queue to handle it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx »

Richmond;
someone, somewhere, somewhen was being deliberately obtuse, and for why forbye; and I jalouse we'll never ken.
Deliberately obtuse? :roll:

Craig
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: Hide cursor, yes, no, depends... HELP!

Post by dunbarx »

Hey, anyone recall that this is a thread about hiding the cursor?

@rfarnold47.

Did that other thread help at all?

Craig
Last edited by dunbarx on Mon Jul 08, 2024 4:10 pm, edited 1 time in total.
SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 328
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Hide cursor, yes, no, depends... HELP!

Post by SWEdeAndy »

FourthWorld wrote: Mon Jul 08, 2024 3:55 pm
SWEdeAndy wrote: Mon Jul 08, 2024 12:13 pm So if you have "on openStack" in the card script (of card 1) then it won't go up to the stack script unless you pass it. Right?
I'm not sure I understand the question. Any handler that handles a message would need to pass it for others further in in the message queue to handle it.
Indeed. It wasn't really a question, just me being extremely cautious when stating facts now, given my failure in that area earlier in the thread... So, just in case this would be a day when I get everything wrong, I put a question mark after things I say here... :D Right? 8)
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10415
Joined: Fri Feb 19, 2010 10:17 am

Re: Hide cursor, yes, no, depends... HELP!

Post by richmond62 »

Deliberately obtuse making openCard 'fire' before openStack . . .

This comment is, thankfully, now redundant.
Post Reply