to no avail;
"he looked for her in vain"
"the city fathers tried vainly to find a solution"
- He had tried vainly and lost his heart at last.
- We struggle vainly, fighting to solve the problem.