How to open and close webbrowser (tab)?
Posted: Mon Oct 09, 2023 3:01 pm
Hi. I implemented OAUTH2 SMTP. For the authentication I have to open a URL in a webbrowser. I do this cross-platform using RunProgram(uri.s) on Windows and MacOS and RunProgram("xdg-open", uri.s) on Linux.
Now I have to close the tab or window after successful authorization. But how to do this? The returned ProgramID is invalid and impossible to close. Looks like the browsers do some process magic in the background (eg tabs and browsers get new different processes).
Any idea, except using a WebGadget? The WebGadget is not reliable and does not support the cookies like the normal webbrowser does.
Now I have to close the tab or window after successful authorization. But how to do this? The returned ProgramID is invalid and impossible to close. Looks like the browsers do some process magic in the background (eg tabs and browsers get new different processes).
Any idea, except using a WebGadget? The WebGadget is not reliable and does not support the cookies like the normal webbrowser does.