Jump to content
UBot Underground

[ask] easy way to change value of the list


Recommended Posts

You first asked how to change the position on all even numbered positions.

 

Now your asking how to change the value of a specific position

simply call the position number and change it.

 

 

What is the purpose, rhyme or reason for what your wanting to do and an exact formula and example could be put together.

 

and please use a real live example. Fake manipulated examples most times lead to misconception and wrong results.

Link to post
Share on other sites

simply call the position number and change it.

 

how to do that?

i can call the list postion number but i can't change the value of that

please gimme the example to do that

 

thanks again

Link to post
Share on other sites

how to do that?

i can call the list postion number but i can't change the value of that

please gimme the example to do that

 

thanks again

 

 

Here is the code example

clear list(%random text)
add list to list(%random text, $list from text("aaa
bbb
ccc
ddd
eee
fff
ggg
hhh
iii
jjj", $new line), "Delete", "Global")
set(#row, 0, "Global")
loop($list total(%random text)) {
   if($comparison($list item(%random text, #row), "=", "fff")) {
       then {
           load html(#row)
       }
       else {
       }
   }
   increment(#row)
}

 

Video demonstration and how to put it together.

http://screencast.com/t/Xs7cZiI7

Link to post
Share on other sites

thanks for your help LoWrIdErTJ

but it still not solve my problem

 

i don't want to load html(#row)

but i want to change value of the list in specific position

 

in this example i want change fff to zzz

so when i check in debugger the list will be

aaa

bbb

ccc

ddd

eee

zzz

ggg

hhh

iii

jjj

Link to post
Share on other sites

I think your confused what you want to do, and therefore wasting time on getting you the exact answer your looking for.

 

You first wanted to change an item

 

then you asked how to get the list position.

I gave you an example how to get that list position.

 

Now stead of load html to bring back the list position.

 

in that loop you can add each item to a new list, and if item = what your looking for then add something else

 

Example:

clear list(%random text)
clear list(%new list)
add list to list(%random text, $list from text("aaa
bbb
ccc
ddd
eee
fff
ggg
hhh
iii
jjj", $new line), "Delete", "Global")
set(#row, 0, "Global")
loop($list total(%random text)) {
   if($comparison($list item(%random text, #row), "=", "fff")) {
       then {
           add item to list(%new list, "text here to replace with", "Delete", "Global")
       }
       else {
           add item to list(%new list, $list item(%random text, #row), "Delete", "Global")
       }
   }
   increment(#row)
}

Link to post
Share on other sites

Finally, Thanks a lot LoWrIdErTJ

that's all i wanted

it seems you are the most active user in this forum ;)

 

simply call the position number and change it.

 

in post #5 i mean how to change value

not to call the position

sorry for the misunderstanding

 

thanks again

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...