Jump to content
Macro Express Forums

read a bare website into variable


Recommended Posts

Hi guys,

I need to read the contents of a mysql database field. It is remote and I have total access to it so can write a php program to simply output the text to a bare html page. I can enclose it with whatever I need to make it easier for ME.

I want to take that string field and input it into a ME variable so I can texttype it.

The webpage will not be previously loaded. I need to load IE first then read the only data on the page into a ME text variable. Then close IE.

Thanks,

Ed

Link to comment
Share on other sites

This should work as long as a field is not focused, in which case it is the field that is selected and copied rather than the page.

 

Text Type (Simulate Keystrokes): <CONTROL>a // Select all
Text Type (Simulate Keystrokes): <CONTROL>c // Copy to clipboard
Variable Set String %Clip% from the clipboard contents

Link to comment
Share on other sites

You might be thinking there's a way to invisibly grab the contents but no such way. You need to use the WebPage command and do as Alan describes above. I often had to do this a great deal and opted instead to use a VBScript in the External Command command to grab a webpage's HTML contents and parse what I needed. I think I posted an example someplace here on the forum of one that downloads the entire contents of the page to a file which you can then load into a variable but in this case I'd rather return the desired text to the console which you could then read directly into a variable. If you are interested please let me know and I'll make you one. In fact I've been meaning to make a general purpose script to do a simple HTTP GET of the contents of a webpage from a given URL.

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...
 Share

×
×
  • Create New...