×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Pass URL to Internet Explorer from text

Pass URL to Internet Explorer from text

Pass URL to Internet Explorer from text

(OP)
I am need to pass a URL that is in a block of text to Internet Explorer and bring up that window.  The url is not recognized by DEC vt420 emulatior as anything more than text.  I see in the previous post how to initiate IE, which i have successfully done, but with a hardcoded address.  I am brand new to Attachmate, MyExtra-v7.0 and would appreciate any help.

thanks

RE: Pass URL to Internet Explorer from text

If the URL is always in the same place, then this code should do the trick. If not, then hopefully you can find some use out of this

CODE

Function surf
' // Get the main system object
    Dim Sessions As Object
    Dim System As Object
    Set System = CreateObject("EXTRA.System")    ' Gets the system object
    If (System is Nothing) Then
        Msgbox "Could not create the EXTRA System object.  Stopping macro playback."
        STOP
    End If
    Set Sessions = System.Sessions

 ' // Get the necessary Session Object
    Dim Sess0 As Object
    Set Sess0 = System.ActiveSession
    If (Sess0 is Nothing) Then
        Msgbox "Could not create the Session object.  Stopping macro playback."
        STOP
    End If
    If Not Sess0.Visible Then Sess0.Visible = TRUE
    Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

 ' // Important part
       Dim ie as object
        Dim sURL as String
        Dim addressRow as Integer '//Row of first char of address
    Dim addressCol as Integer '//Column of first char of address
    Dim lengthOfAddress as Integer '//Self explanatory
        set ie = CreateObject("InternetExplorer.Application")
        ie.visible = true
 ' // You can set sURL to anything, this just finds the first char of the address on the screen,
 ' // and takes the string for a specified length (which should be the length of the URL)
        sURL = Sess0.getString(addressCol, addressRow, lengthOfAddress)
        ie.Navigate(sURL)
End Function

RE: Pass URL to Internet Explorer from text

(OP)
Thanks for the response.  the links can be anywhere in a freeform comment box so what i ended up doing is just creating a HOtSPot button that would send the highlighed link to IE.  not exactly slick, but it works.   
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close