Jump to content
UBot Underground

[ HOW ] to Find list Position


Recommended Posts

HI, anybody could help me to find a list position By variable

example :

 

orange

banana

juice

manggo

coffe

 

and What I intend to do is set the list position on the word "Juice" and go to the next list item, the problem is, my list is filled with thousand words, and need to be done automaticly.

 

thank you

 

 

Thank you Jhon, Its works

Edited by mariah
Link to post
Share on other sites

You can do it like this:

 

clear list(%list)

add list to list(%list, $list from text("orange

banana

juice

manggo

coffee", $new line), "Delete", "Global")

set(#position, 0, "Global")

loop($list total(%list)) {

if($comparison($list item(%list, #position), "=", "juice")) {

then {

alert("\"juice\" is at list position {#position}")

}

else {

}

}

increment(#position)

}

 

 

John

  • Like 2
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...