Hi all,
I'm new user and i'm testing the MiniBrowser sample, change a couple of actions and all works fine -yet-
I'm trying to get a variable with the clicked link on any webpage. program goes to the new location, but i can`t get the new url address.
Any ideas to solve this ?
Greetings from Buenos Aires, Argentina
How to get the webbrowser address ?
- daviddeargentina
- New User
- Posts: 6
- Joined: Fri Jun 30, 2023 7:37 pm
Re: How to get the webbrowser address ?
daviddeargentina wrote: Fri Jun 30, 2023 7:57 pm I'm trying to get a variable with the clicked link on any webpage. program goes to the new location, but i can`t get the new url address.
From the help file for webgadget wrote: GetGadgetText(): Get the current URL.
- daviddeargentina
- New User
- Posts: 6
- Joined: Fri Jun 30, 2023 7:37 pm
Re: How to get the webbrowser address ?
Thanks a bunch!
Re: How to get the webbrowser address ?
you can also use the NavigationCallback:
Code: Select all
Procedure NavigationCallback(Gadget, Url$)
Debug Url$
ProcedureReturn #True
EndProcedure
OpenWindow(0, 0, 0, 1000, 800, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(0, 0, 0, 1000, 800, "https://www.purebasic.com")
SetGadgetAttribute(0, #PB_Web_NavigationCallback, @NavigationCallback())
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Hygge
- daviddeargentina
- New User
- Posts: 6
- Joined: Fri Jun 30, 2023 7:37 pm
Re: How to get the webbrowser address ?
very interesting alternative. thank you so much.
I'm still investigating:
if I change the url from purebasic.com to (for example)
https://maps.google.com/maps?z=10&t=m&q ... 5209230567
after a couple of seconds, google does not validate credentials and asks to change browser.
Is there a way to fix this?
Thanks again
David
I'm still investigating:
if I change the url from purebasic.com to (for example)
https://maps.google.com/maps?z=10&t=m&q ... 5209230567
after a couple of seconds, google does not validate credentials and asks to change browser.
Is there a way to fix this?
Thanks again
David
Re: How to get the webbrowser address ?
I don't know what the webgadget is based on, but like that it's just a simple browser, no ajax/javascript, etc.
Maybe use one of the chromium extensions? Probably have better luck with those.
Maybe use one of the chromium extensions? Probably have better luck with those.