1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| Set System = CreateObject("EXTRA.System") ' Gets the system object
Nbsessions = System.Sessions.Count
If Nbsessions = 0 Then
Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 3)
'RepSession = "c:\program files\appext\sessions\icones\" & vEDP
'chemin extra vista
RepSession = "C:\Users\Public\applications\sessions\Icones\" & vEDP
If Dir(RepSession) = "" Then Stop:
Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 3)
'ReturnValue = Shell("c:\program files\e!pc\extra.exe " + RepSession, 0)
'chemin extra vista
ReturnValue = Shell("C:\Program Files\Attachmate\EXTRA!\extra.exe " + RepSession, 0)
Set Sess0 = Nothing
Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 3)
' Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 3)
' Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 3)
End If
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."
Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 3)
End If
Set Sessions = System.Sessions
If (Sessions Is Nothing) Then
MsgBox "Could not create the Sessions collection object. Stopping macro playback."
Application.Wait TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 3)
End If
'--------------------------------------------------------------------------------
' Set the default wait timeout value
g_HostSettleTime = 200 ' milliseconds
OldSystemTimeout& = System.TimeoutValue
If (g_HostSettleTime > OldSystemTimeout) Then
System.TimeoutValue = g_HostSettleTime
End If
' Get the necessary Session 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 |
Partager