How it works
- Give it the list and the position: 1 for the first, 2 for the second, -1 for the last.
- It returns the item and whether it was found.
- A position past the end doesn't fail the step; found is just false.
Routines that use it
Newest download
Sort files by date with Sort list, Z to A, and get item 1 to open with Open file or folder.
Random wallpaper
Pick a random position with Random number and set that image with Set wallpaper.
Last line
Split a log with Split text, take item -1 and check it with Compare values.
Settings
| Setting | What it does |
|---|---|
| List | The list. |
| Position | Which item: 1 for the first, 2 for the second, -1 for the last. |
Questions
- How do I get the last item in a list?
- Set the position to -1. Negative positions count from the end.
- What if the list is shorter than the position?
- The step succeeds with found set to false, so you can handle it with an If.