How to capture the content of the webgaget as text automatically?
Posted: Thu Apr 06, 2023 2:57 pm
Hi,
In below code, When the webgaget becomes stable, I need to right click inside it to raise the popup menu and choose " select all" to capture the content of the web page as text (I do not want HTML code). How can I automize the process, that is, no need to sent the select all command to the webgaget manually.
For WIn 10 x64.
Thanks
Allen
In below code, When the webgaget becomes stable, I need to right click inside it to raise the popup menu and choose " select all" to capture the content of the web page as text (I do not want HTML code). How can I automize the process, that is, no need to sent the select all command to the webgaget manually.
Code: Select all
MainWin=OpenWindow(#PB_Any, 0, 0, 1000, 1000, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebWin=WebGadget(#PB_Any, 10, 10, 1000, 1000, "https://www.purebasic.com/news.php")
Repeat
Event=WaitWindowEvent(100)
a$=GetGadgetItemText(WebWin,#PB_Web_SelectedText )
If a$<>""
Debug a$
Break
EndIf
Until Event = #PB_Event_CloseWindow
CloseWindow(MainWin)
Thanks
Allen