get location

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
Samuele
Posts: 282
Joined: Mon Oct 11, 2021 7:05 pm

get location

Post by Samuele »

Hi, is there a way that i can get the location of an object, this would be helpful for example if the location of the objects a random location and i want to get the location if something happens for example, thanks!
Samuele.
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10509
Joined: Wed May 06, 2009 2:28 pm

Re: get location

Post by dunbarx »

Hi.

The "location" property does just that. And if you did not know about that, consider looking at such things as the "topRight", "Bottom", etc.

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

Re: get location

Post by dunbarx »

Also look at the "ScreenLoc" function. It often is more useful, depending on what you are up to.

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

Re: get location

Post by richmond62 »

SShot 2022-01-26 at 18.13.15.png
Attachments
LOC.livecode.zip
Here's the stack.
(949 Bytes) Downloaded 206 times
Samuele
Posts: 282
Joined: Mon Oct 11, 2021 7:05 pm

Re: get location

Post by Samuele »

Thank you very much, it worked!
Samuele.
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: get location

Post by Klaus »

And is also listed in the Dictionary under "location"! 8)
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10430
Joined: Fri Feb 19, 2010 10:17 am

Re: get location

Post by richmond62 »

Some people obviously feel that the Forums are the 'go to' place rather
than the Dictionary. This might be because the Dictionary presupposes
you know the term you are looking for.
Samuele
Posts: 282
Joined: Mon Oct 11, 2021 7:05 pm

Re: get location

Post by Samuele »

Klaus wrote: Wed Jan 26, 2022 5:57 pm And is also listed in the Dictionary under "location"! 8)
What do you think, now before posting i always check the dictionary first, since i can imagine you yelling at me "check the dictionary!" :lol:
no, but joking aside, I looked for it under location but I didn't find it, or maybe i just didn't understand what i'd found.
Samuele.
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10430
Joined: Fri Feb 19, 2010 10:17 am

Re: get location

Post by richmond62 »

maybe i just didn't understand what i'd found
It isn't always easy. 8)
Post Reply