Record loading with MBS( "WebView.GetPlainText"; WebViewerRef )

I'm currently using MBS("WebView.GetPlainText"; WebViewerRef) to extract content from the Web Viewer. Right now, I have a 0.3 second pause after each record to allow it to load, but this would make processing 1,000 records take quite a long time. Is there a more efficient or faster way to handle this?

Well, you could make a loop to wait some time:

# first give FileMaker some time to load
Pause/Resume Script [Duration (seconds): ,1]

# now wait until it is fully finished
Loop
	Exit Loop If [MBS("WebView.IsLoading"; "web") ≠ 1]
	Pause/Resume Script [Duration (seconds): ,1]
End Loop

So sometimes 0,1 would be enough.

For the first query, it may be good to do 0,3 seconds and have "about:blank" as initial URL in the web viewer, so FileMaker creates it, before your loop runs.

1 Like

Thank you, this worked!