Jump to content
Macro Express Forums

Analyze web page content


rberq

Recommended Posts

I have a IE6 web-based application with 10 possible web pages that may appear, all with the same window title but (obviously) with different content. I need my macro to identify which page is currently appearing. I can:

(1) Alt-View Source, and analyze the text that pops up in a Notepad window. .

(2) Edit-Find text unique to each page, copy to clipboard, and analyze whether the text was found.

(3) Use the Ctrl-a combination to highlight all data on the screen, copy to clipboard, and analyze.

 

The trouble with all of these is, they are visible to the user. Edit-Find is probably the least obvious if it’s a small amount of data. Can anyone suggest an invisible way to retrieve and analyze the text on a web page? The solution is probably there somewhere in ME, I just don’t know where….

 

Thanks for any and all ideas.

Link to comment
Share on other sites

I have a IE6 web-based application with 10 possible web pages that may appear, all with the same window title but (obviously) with different content. I need my macro to identify which page is currently appearing. I can:

(1) Alt-View Source, and analyze the text that pops up in a Notepad window. .

(2) Edit-Find text unique to each page, copy to clipboard, and analyze whether the text was found.

(3) Use the Ctrl-a combination to highlight all data on the screen, copy to clipboard, and analyze.

 

The trouble with all of these is, they are visible to the user. Edit-Find is probably the least obvious if it’s a small amount of data. Can anyone suggest an invisible way to retrieve and analyze the text on a web page? The solution is probably there somewhere in ME, I just don’t know where….

 

Thanks for any and all ideas.

 

 

You pose a good question...

I couldnt find anything in ME or ME Pro (granted i am not super familiar with ME Pro)

I tried hunting around online for a tool that might snag the source and save it, but they looked kind of sketchy.

 

I did find a vbs script that might work for this,

 

Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
   Dim lngRetVal As Long
   lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
   If lngRetVal = 0 Then DownloadFile = True
End Function
Private Sub Form_Load()
   'example by Matthew Gates (Puff0rz@hotmail.com)
   DownloadFile "http://www.allapi.net", "c:\allapi.htm"
End Sub

 

its just what i was able to hunt down while searching for a solution.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...