PASSPORT Knowledge Base
Macros

Date Published: April 4, 2005
Date Updated: March 17, 2009

Title

Read Data from Host Screen and Pass to URL

Product

PASSPORT PC to Host, PASSPORT Web to Host

Emulation Types

TN3270, TN5250, VT, SCO ANSI, Wyse 60

Issue

I would like to read data from a host screen, start Internet Explorer and pass the data to the URL. Is this possible with PASSPORT?

Solution

This can be accomplished with a macro, which will set variables for one or more text strings from the host screen, then pass these as parameters to the Shell command, which will start Internet Explorer (see example below).

Example

Sub ZMain()

 Dim MyURL, ret, fso

  MyURL = GetString (15, 46, 12)

  set fso = createobject("Scripting.FileSystemObject")

   if fso.fileexists("C:\Program Files\Internet Explorer\iexplore.exe") then      

            ret = Shell ("C:\Program Files\Internet Explorer\iexplore.exe " & MyURL, 1)

  else

            msgbox "Non-Standard location"

            ret = Shell ("C:\Program\Internet Explorer\iexplore.exe " & MyURL, 1)

  end if

End Sub

More Information

Keywords

macro, read, data, host, screen, url, web, browser, internet explorer