1-I saw John two months ago. He was almost running after a bus.
2-John almost ran after that bus every day.
3-John almost shouted: 'Be careful."
I think in 1 and 2 he is walking very fast after the bus. He is not really running, but he is almost running.
I think in 3, the situation is different.
I think 3 can be used if he was about to shout, but did not say anything.
Could it be used if he said 'Be careful' so loudly that it was almost a shout?
Where two meaning are possible, I'd go for the most likely in the context. 2 suggests he scurried along because of the words every day- he's less likely to consider running and change his mind every single day. Without more context, I'd say that 3 is more likely to mean that he didn't say anything.