Creating Array - Auto Numeric

dunbarxx dunbarx at aol.com
Tue Sep 18 12:44:33 EDT 2018


Hi.

Is this what you want?

on mouseUp
   repeat with y = 1 to the number of words of fld 1
      select word y of fld 1
      put the selectedLoc into wordLocationA[y][word y of fld 1]
   end repeat
end mouseUp

I suspect not. Is it that you want the output to be:

WordLocationA["Cut"][100,320]
WordLocationA["the"][1][200,320]
WordLocationA["apple"][500,320] 
WordLocationA["Cut"][300,320] 
WordLocationA["the"][400,320] 
WordLocationA["banana"][500,320]

If so, why use an array? Just:

on mouseUp
   repeat with y = 1 to the number of words of fld 1
      select word y of fld 1
      put word y of fld 1 &","& the selectedLoc & return after locList
   end repeat
end mouseUp

Craig Newman




--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html




More information about the use-livecode mailing list