Replacement for "list_position"????

Hey,
it’s some time gone, since I last used AppleScript to automate something.
As I can remember, at this time the command “list_position” was existing to determine the position (as number) of a certain item in a given item list.
As I now tried to use this for a new droplet, it failed and I can’t find it any more in the standard scripting additions.
Can anyone help me in what syntax to use to get the same result. I only found “offset” but got doubts, that this will only work with text strings but not with lists.

Model: MacBook Pro 13" late 2011
AppleScript: 2.5
Browser: Safari 605.1.15
Operating System: macOS 12

List_position was never part of the language or standard additions. It may have been part of a scripting addition.

Try something like this:


set myList to {"ABC", 123, {"four", 5, "F"}}
set myItem to some item of myList

set positionInList to GetListPosition(myList, myItem)

return {positionInList, myItem, myList}

on GetListPosition(aList, anItem)
	repeat with x from 1 to count of aList
		if anItem = item x of aList then return x
	end repeat
	return 0
end GetListPosition