web browser - Forum

Forum Navigation
You need to log in to create posts and topics.

web browser

It is possible without having a web browser and using the command "BrowserGetElement"
Get it from the file?

 

@s7shanbe Are you trying to say that you have a html file and you wish to extract information from it using BrowserGetElement command but you don't want to load the html file into web browser.

Is my understanding correct?

@neodude yes correct.

@s7shanbe Its possible.

Method 1:

You need to load the file's text into a variable and then use StrSearch, SubStr

FileToVar "[PubDir]webpage.html" "[Result]"

I can help you better if you provide me some sample HTML.

@neodude

in this file: https://drive.google.com/Open?id=1R-qvEmIT6PCs5sqwwtr3dOVnPkagWb8v

BrowserGetElement "WebBrowser8" "persian:year" "[y]"
BrowserGetElement "WebBrowser8" "persian:month" "[m]"
BrowserGetElement "WebBrowser8" "persian:day" "[d]"
BrowserGetElement "WebBrowser8" "persian:leap" "[e]"

https://drive.google.com/Open?id=1R-qvEmIT6PCs5sqwwtr3dOVnPkagWb8v

Your link gives me Not found error. Please upload it on tinyupload dot com.

@neodude  I uploaded the file to this link:

http://s000.tinyupload.com/index.php?file_id=17166606771441819214

Hello @s7shanbe

This function will return the text between starting and ending string. Replace <a> and </a> as per your requirement.

 

Usage:

FileToVar "file.html" "[html]"

SetVar "[start]" "<a>"

SetVar "[end]" "</a>"

Call "capture" "[html]"  "[start]" "[end]" "capture" "matched"

AlertBox "We got the string between start and end" "[capture]"

 

Uploaded files:
  • You need to login to have access to uploads.