Search found 5 matches

by Techmas
Mon Mar 31, 2025 6:59 pm
Forum: Coding Questions
Topic: WebGadget: Fetch Page Title
Replies: 8
Views: 51773

Re: WebGadget: Fetch Page Title

It works, thanks.
by Techmas
Sun Mar 30, 2025 10:37 am
Forum: Coding Questions
Topic: WebGadget: Fetch Page Title
Replies: 8
Views: 51773

Re: WebGadget: Fetch Page Title

It works with the suggested pause, but possibly not always.

I doubt the reliability as the required pause can be different for each run. It may work, but may fail if loading takes longer than expected.
How to find the min. required pause? How to make it fail-safe?
by Techmas
Wed Mar 26, 2025 9:36 pm
Forum: Coding Questions
Topic: WebGadget: Fetch Page Title
Replies: 8
Views: 51773

Re: WebGadget: Fetch Page Title

No errors are thrown in the dev console but I made the following observation:

The following code shows 'undefined' in the TextGadget...


If OpenWindow(0, 0, 0, 600, 300, "WebView", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If WebGadget(0, 0, 25, 600, 275,"https://www.blablah.com/index ...
by Techmas
Tue Mar 25, 2025 9:41 pm
Forum: Coding Questions
Topic: WebGadget: Fetch Page Title
Replies: 8
Views: 51773

Re: WebGadget: Fetch Page Title

Thanks for your reply!

Yes I am.
I suspect, it tries to get the title before the page is fully loaded... How can I check whether the page is loaded or not?

In PureBasic I use the following loop to wait until the title is there:

While Len(GetGadgetItemText(0, #PB_Web_PageTitle)) = 0
WindowEvent ...
by Techmas
Mon Mar 17, 2025 7:44 pm
Forum: Coding Questions
Topic: WebGadget: Fetch Page Title
Replies: 8
Views: 51773

WebGadget: Fetch Page Title

Hi there,

I'm trying to fetch the title of the webpage that is displayed in the WebGadget (like it is possible in PureBasic) but GetGadgetItemText(0,#PB_Web_PageTitle) is returning 'undefined' (see below example).

Can somebody help me out with this?

Thanks!



If OpenWindow(0, 0, 0, 600, 300 ...