Sounds like more work than just simply updating the position of a single frame.
If you use a single frame. You only need to define the min & max value then you will only need a few if queries. If you create a value & link it to a pause value then you can also control the speed of the pause value by editing the values number.
So with this in mind... say, at a range of 100 to 150 & 150 to 200 you want it to update via the normal speed & then increase the speed as you go past those numbers. It's easy enough by defining ranges with a combination of and / or queries.
1. I would first have an action to initialize the position & value on scene/puzzle/mini-game start. So for this you could do a set random value with min = 140, max = 160. This will push the starting position over to one side thus allowing you to easily determine if it should be incrementing or decrementing.
2. After setting up the initial value, you would follow this through by using the ActiveAnimations["anim_name"].Position = {x = x, y = y} value determined by the value of value mentioned above for setting up the position instantly.
3. You then create some new actions for controlling the increment with some if queries & a jump to x action part to create a loop. The value ranges defined in the if queries will determine the speed that you set in another value (as I mentioned further up this post) which will control the speed of the increment or decrement.
4. The keyboard controls will work however you decide to implement them with the default looping key action or with the key (released) action.
I guess I've been a bit vague here, but you did say you wanted to learn/figure out how to sort it out more or less yourself.