Jump to content
Sign in to follow this  
Fyzzle

Select text in an IE window

Recommended Posts

Fyzzle

The scenario I have is that I have to go online to request keys for software packages and I would like to script out as much as possible.

I've automated getting the key but I would like to be able to select it and assign it to a variable for later use, and I'm not sure how to get it.

Here's the spot in the page where I can see it, i've changed the key around so it's not a real key, but obviously it will change every time.

<tr>
   <td>Activation Id:
   <div class=note>Activation Id is Case Sensitive</div>
   </td>
   <td>e12a-daf6-812d-4abe-b9h2-3acb-9qqf-0709</td>
  </tr>

There's also a second spot where it appears, not sure if that would work better or not.

<tr>
   <td>Details:</td>
   <td><a
    href="/wba/licenseDetails.do?license=e12a-daf6-812d-4abe-b9h2-3acb-9qqf-0709&server=FNO"
    target="_blank">License details</a></td>
  </tr>

I've looked at _IEBodyReadText but I don't see a way to just pull a key out of the code, anyone run into something like this yet? Clicking that link gets me to another page but is not anymore helpful with any objects I can reference.

Thanks guys.

Share this post


Link to post
Share on other sites
Danp2

You could use _IELinkGetCollection to get all the links and then scan the hrefs of the resulting collection for those that match your desired URL, ie: /wba/licenseDetails.do. Then just parse the href to get the license number.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×