Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass URL to Internet Explorer from text 1

Status
Not open for further replies.

1DME

MIS
Jan 28, 2009
2
US
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
 
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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top