Competition #1C: Reverse order of lines of a string
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Competition #1C: Reverse order of lines of a string
..........
Last edited by [-hh] on Wed Aug 13, 2014 1:37 pm, edited 2 times in total.
shiftLock happens
Re: Competition #1C: Reverse order of lines of a string
..........
Last edited by [-hh] on Wed Aug 13, 2014 1:36 pm, edited 1 time in total.
shiftLock happens
Re: Competition #1C: Reverse order of lines of a string
Hi Hermann,
in another post the reverse order of lines came up and I remembered a discussion on the use-list using sort with function brought forth by Jacque. See sort in dictionary.
obviously you would have to have 2 fields, 1 "source" and 1 "destination" to run this script
Kind regards
Bernd
in another post the reverse order of lines came up and I remembered a discussion on the use-list using sort with function brought forth by Jacque. See sort in dictionary.
obviously you would have to have 2 fields, 1 "source" and 1 "destination" to run this script
Code: Select all
local sNoLines -- index used by function inverseLines to sort
on mouseUp
put field "source" into tData
put 0 into sNoLines -- dont worry it will count down below 0
sort lines of tData numeric by inverseLines()
put tData into field "destination"
end mouseUp
private function inverseLines
subtract 1 from sNoLines
return sNoLines
end inverseLines
Bernd