Hi KanchanaD
KanchanaD wrote:Thank You ForThe Reply Klaus,

although i dont understand clearly what you are saying, could you write it in code because its hard to understand.

well, I actually posted CODE, but witjouth a wrapping handler
Maybe it will be clearer this way:
Code: Select all
on mouseup
## 1. Create a 3 line text list, one LOC on each line
put "322,412" & CR & "468,344" & CR & "638,414" into tLocList
## 2. Now you can choose a RANDOM line and use it as the new loc for your button:
set the loc of button "Mons" to ANY line of tLocList
## ANY = RANDOM, but fits better in this situation.
end mouseup
Here is what I do:
1. I create a variable with 3 lines, one LOC on each line!
The resulting variable tLocList will now look like this:
322,412
468,344
638,414
2. Then I use the keyword ANY, which is equivalent to RANDOM but will work better in this situation
Please look up all terms in the dictionary to get more info!
Since Livecode is VERY english like, I can now "say":
...
put ANY line of tLocList into tAnotherVariable
...
And will have a RANDOM loc in this new variable.
Best
Klaus