PASSPORT Knowledge Base
Object Interface

Date Published: April 21, 2009

Title

Launch Session in Minimized Mode

Product

PASSPORT Web to Host

Emulation Types

TN3270, TN5250, VT, SCO ANSI, Wyse 60

Issue

I need a handle for the IE window for the session I am using in order to control how it appears (launch minimized).  In Extra!, I do it using the following:

 

Appid = Shell(<Extra! file> & " " & <Extra! session file>, vbMinimizedFocus)

 

How can I do this with Passport?

Solution

This can done using by writing a .ZAM macro (using the PASSPORT Object API) along with the use of the Shell command.   See below:

 

Sub Main()

Dim Sessions As Object

Dim System As Object

Set System = CreateObject("passport.System") ' Gets the system object

If (System is Nothing) Then

Msgbox "Could not create the PASSPORT System object.  Stopping macro playback."

STOP

End If

Set Sessions = System.Sessions

If (Sessions is Nothing) Then

Msgbox "Could not create the Sessions collection object.  Stopping macro playback."

STOP

End If

Appid = Shell("""c:\Program Files\Internet Explorer\iexplore.exe""" & "http://servername/pecadmin/Eclient/Ecomes.asp?sessionprofile=3270dsp/Sessions/session", vbMinimizedFocus)

End Sub

More Information

Keywords

launch, session, minimized, mode, IE, Window, appid, shell