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 55 56 57 58 59 60 61 62 63 64 65 66
| For i = 1 To a
b = sessions.Item(i)
If Left(b, 1) = "A" Or b = "Host" Then x = i
Next i
Set Sess0 = sessions.Item(x)
Do While Sess0.screen.OIA.XStatus = 5: Loop
Do While Capture(1, 2, 9) <> "OUVERTURE"
DoEvents
Loop
Do While Sess0.screen.OIA.XStatus = 5: Loop
testextra = 1
GoTo debutmacroextra
End If
x = 0
For i = 1 To a
b = sessions.Item(i)
If Left(b, 1) = "A" Or b = "Host" Then x = i
Next i
Set Sess0 = sessions.Item(x)
If x = 0 Then
MsgBox "il n'y a pas de session TGC d'ouverte"
initialiser_Tgc = False
Exit Function
End If
If (Sess0 Is Nothing) Then
MsgBox "Lancez d'abord l'emulation extra! "
initialiser_Tgc = False
Exit Function
End If
If Not Sess0.Visible Then Sess0.Visible = True
Do While Sess0.screen.OIA.XStatus = 5: Loop
If testextra = 1 Then
Curseur 7, 40
Envoi Identification_tgc.TextBox1.Value
Curseur 8, 40
Envoi Identification_tgc.TextBox2.Value
Curseur 9, 40
Envoi1 "TGC"
If Capture(15, 40, 4) = "Code" Then
Commande "LIBC"
Commande "LIBC"
End If
Unload Identification_tgc
AppActivate "Microsoft Excel"
End If
test = Sess0.screen.GetString(9, 8, 9)
If test <> "REFERENCE" Then
MsgBox "Mettez vous sur l'affichage TGC", vbOKOnly
initialiser_Tgc = False
Exit Function
End If
initialiser_Tgc = True
End Function |
Partager