Supposed I have a file Fruits.txt that contains:
Apple
Banana
Cherry
Durian
Elderberry
I would like to use Prompt with List action with Fruits.txt. So if I select Elderberry, then Fruits.txt would be re-saved to become:
Elderberry
Apple
Banana
Cherry
Durian
If I run the macro again and selects Cherry, then the Fruits.txt would be re-saved again to become:
Cherry
Elderberry
Apple
Banana
Durian
There are no doubt many ways to do this. Here is a way that uses Keyboard Maestro native Actions. It works with the list you provided. The example has the list in a local variable. To adapt it to a saved file you would need to read and write the local variable to a file.
The logic is to search the list for the chosen line and remove it from the list, then to put the chosen line at the head of the list.