I am guessing 240V your not USA. I am so what I do may not apply as well?
For 12Vdc to 120Vac power I use a cheap inverter, plug the laptop into that with the grid wall wort adapter. Fast easy simple, not most effecient though. For vehicle use you probably don't care about a small loss, I don't, so I do that.
Get a 12V adapter, I use those for some things, mostly the stuff that came with them. If too costly to buy the right one then I use the inverter.
Others can say better how to charge 2 12V batteries seperate than I can. I have done this for 24V inverters in a van or truck. I think I just put diodes on the wires, each battery was charged at 12V from the vehicle but wired to the UPS as 24V. Been along time and I have done other things with like battery isolaters etc.. so maybe I wired something else up, but it worked.
If you have "OK" but low batteries that won't hold allot of charge this might work, run engine as needed.
If you can get some cheap batteries and charge seperate like I did, figure out the runtime, you get sit awhile and use the UPS as the power source and just start engine as needed to charge back up, watch the run times.
Mine was used while driving so I did not worry about it.
Be aware some UPS's may die if just ran on batteries with no load to long. I just fried a cheapo, real cheap, UPS running it on a 12V battery for hours and nothing was even plugged into it! What crap! My other UPS's, larger and better ones, run forever it seems with loads running and never a problem. Maybe that UPS was just bad to begin with??