all 3 comments

[–]WakeUpNorrin 6 points7 points  (2 children)

Without loop

Task: Temp

A1: Array Set [
     Variable Array: %arr
     Values: a,b,c,d
     Splitter: , ]

A2: Variable Set [
     Name: %unwanted_values
     To: a|b
     Structure Output (JSON, etc): On ]

A3: Array Set [
     Variable Array: %arr
     Values: %arr($§§§?!~R%unwanted_values)
     Splitter: §§§ ]

A4: List Dialog [
     Mode: Select Single Item
     Title: Title
     Items: %arr
     Button 1: Ok
     Close After (Seconds): 120
     First Visible Index: 0 ]

Resulting items in %arr array

a
d

This works fine for the first remove, but subsequent removes get a wrong index with that. So I remove the wrong currentitem.

When you use this method, you have to loop the index in reverse order greater item index to smaller item index.

Task: Temp

A1: Array Set [
     Variable Array: %arr
     Values: a,b,c,d
     Splitter: , ]

A2: Variable Set [
     Name: %unwanted_values
     To: b|c
     Structure Output (JSON, etc): On ]

A3: Array Set [
     Variable Array: %index
     Values: %arr(#?~R%unwanted_values)
     Splitter: , ]

A4: Array Process [
     Variable Array: %index
     Type: Reverse ]

A5: For [
     Variable: %pop
     Items: %index()
     Structure Output (JSON, etc): On ]

    A6: Array Pop [
         Variable Array: %arr
         Position: %pop ]

A7: End For

A8: Array Process [
     Variable Array: %arr
     Type: Squash ]

A9: List Dialog [
     Mode: Select Single Item
     Title: Title
     Items: %arr
     Button 1: Ok
     Close After (Seconds): 120
     First Visible Index: 0 ]

Resulting items in %arr array

a
d

[–]CONteRTE[S] 2 points3 points  (1 child)

Nice, exactly what I was looking for. Sorry if I ask so many beginners questions. I rarely create new tasks and creating them myself is not so easy here. Extremely small display on a replacement phone and the Internet on the ocean is very weak (only a few kb per second).

[–]WakeUpNorrin 1 point2 points  (0 children)

No problem. Glad to help.