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: FourthWorld, heatherlaine, Klaus, kevinmiller

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

get location

Post by Samuele » Wed Jan 26, 2022 4:29 pm

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: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: get location

Post by dunbarx » Wed Jan 26, 2022 4:31 pm

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: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: get location

Post by dunbarx » Wed Jan 26, 2022 4:32 pm

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: 10097
Joined: Fri Feb 19, 2010 10:17 am

Re: get location

Post by richmond62 » Wed Jan 26, 2022 5:15 pm

SShot 2022-01-26 at 18.13.15.png
Attachments
LOC.livecode.zip
Here's the stack.
(949 Bytes) Downloaded 129 times

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

Re: get location

Post by Samuele » Wed Jan 26, 2022 5:28 pm

Thank you very much, it worked!
Samuele.

Klaus
Posts: 14191
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: get location

Post by Klaus » Wed Jan 26, 2022 5:57 pm

And is also listed in the Dictionary under "location"! 8)

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

Re: get location

Post by richmond62 » Wed Jan 26, 2022 5:59 pm

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 » Wed Jan 26, 2022 6:07 pm

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: 10097
Joined: Fri Feb 19, 2010 10:17 am

Re: get location

Post by richmond62 » Wed Jan 26, 2022 6:11 pm

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

Post Reply