Professional Documents
Culture Documents
'pathin = "c:\temp\macro-genesis\lineas.txt"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 6, 13
.WaitForDisplayString "Opcion....", "30", 6, 2
.TransmitANSI "1"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 7, 13
.WaitForDisplayString "Accion....", "30", 7, 2
.TransmitANSI "c"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.SetMousePos 5, 14
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.SetMousePos fila, 3
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rccurrentgraphicscursosrx,
rcCurrentGraphicsCursorY
.TransmitANSI "s"
.TransmitTerminalKey rcIBMEnterKey
'Loop
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
fin:
.TransmitTerminalKey rcIBMPf3Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
End With
'Close 1
Close 2
End Sub
Sub Hernancito_Facturacion()
'
' Hecho por Hernancito Copy Right Rock and Rule SA
'PRUEBO SIN DIMENSIONAR
'Dim pathin, pathou, linea, urb, iur, inter, mesin, vto, llur, lliur As String
Dim resumen(9) As String
pathin = "d:\TEMP\entrada.TXT"
'InputBox("Ingrese Ruta y nombre del archivo de texto que contiene las lneas",
"Telefonia Publica")
pathou = "d:\TEMP\resulta.TXT"
'InputBox("Ingrese Ruta y nombre del archivo de texto a crear", "Telefonia
Publica")
hb = 11
Do Until hb = 20 Or .GetDisplayText(hb, 3, 1) <> "_"
.SetMousePos hb, 3
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.TransmitANSI "s"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.TransmitTerminalKey rcIBMTabKey
.TransmitANSI "resum"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
resumen(hb - 10) = Trim(.GetDisplayText(16, 61, 15))
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
hb = hb + 1
Loop
'*********************************************
Print #2, linea & " " & datos1 & " " & resumen(1)
Print #2, linea & " " & datos2 & " " & resumen(2)
Print #2, linea & " " & datos3 & " " & resumen(3)
Print #2, linea & " " & datos4 & " " & resumen(4)
Print #2, linea & " " & datos5 & " " & resumen(5)
Print #2, linea & " " & datos6 & " " & resumen(6)
Print #2, linea & " " & datos7 & " " & resumen(7)
Print #2, linea & " " & datos8 & " " & resumen(8)
Print #2, linea & " " & datos9 & " " & resumen(9)
.TransmitTerminalKey rcIBMPf3Key
.TransmitTerminalKey rcIBMPf3Key
.TransmitTerminalKey rcIBMPf3Key
.TransmitTerminalKey rcIBMPf1Key
.TransmitTerminalKey rcIBMPf9Key
registro = registro + 1
Loop
Close 1
Close 2
End With
End Sub
Sub Hernan_libreria()
'algunas instrucciones
pathin = "d:\d\entrada.txt"
pathout = "d:\d\salidaCYCZ.txt"
With Session
Close 1
Close 2
End With
End Sub
Sub Detalle_de_facturacion()
'
' Detalle_de_facturacion Macro
' Macro created 31/01/01 by Usuario
pathin = "d:\temp\tocata.txt"
perin = "d:\temp\periodo.txt"
With Session
Do While Not EOF(3) 'lista periodo
pathou = "d:\temp\" & Mid$(mesao, 1, 2) & "_" & Mid$(mesao, 4, 2) & "_" &
linea & "_detalle.txt"
Open pathou For Output As 2
'Emision = "01/11/99"
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 5, 14
.WaitForDisplayString "Nro.Linea.:", "30", 5, 2
.TransmitTerminalKey rcIBMTabKey
.TransmitTerminalKey rcIBMTabKey
.TransmitTerminalKey rcIBMTabKey
.TransmitTerminalKey rcIBMTabKey
.TransmitTerminalKey rcIBMTabKey
.TransmitTerminalKey rcIBMTabKey
.TransmitANSI emision
.TransmitTerminalKey rcIBMEnterKey
.TransmitTerminalKey rcIBMPf22Key
.WaitForEvent rcEnterPos, "30", "0", 11, 3
fila = 11
Do While mesao <> GetDisplayText(fila, 69, 5)
If fila = 20 Then
.TransmitTerminalKey rcIBMPf8Key
.Wait ("3")
fila = 11
Else: fila = fila + 1
End If
If GetDisplayText(fila, 69, 5) = " " Then
GoTo fin
End If
Loop
.SetMousePos fila, 3
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rccurrentgraphicscursosrx,
rcCurrentGraphicsCursorY
.TransmitANSI "s"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "120", "0", 1, 1
Ultimo = 0
Do While Ultimo = 0
filaguion = 9
Do While filaguion < 21 And Ultimo = 0
If .GetDisplayText(filaguion, 14, 1) <> "-" Then Ultimo = 1
filaguion = filaguion + 1
Loop
filaguion = filaguion - 1
If Ultimo = 1 Then filaguion = filaguion - 1
.SetSelectionStartPos 7, 1 'Fila y columna de inicio
.ExtendSelectionRect filaguion, 79 'Fila y columna fin
.CopySelection
Print #2, .GetClipboardText
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "", "0", 1, 1
'.WaitForEvent rcEnterPos, "", "0", 7, 3
Loop
'internacionales
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcEnterPos, "30", "0", 11, 3
fila = 11
Do While mesao <> GetDisplayText(fila, 69, 5)
If fila = 20 Then
.TransmitTerminalKey rcIBMPf8Key
.Wait ("3")
fila = 11
Else: fila = fila + 1
End If
If GetDisplayText(fila, 69, 5) = " " Then
GoTo fin
End If
Loop
.SetMousePos fila, 3
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rccurrentgraphicscursosrx,
rcCurrentGraphicsCursorY
.TransmitANSI "s"
.TransmitTerminalKey rcIBMEnterKey
Ultimo = 0
Do While Ultimo = 0
filaguion = 7
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "", "0", 1, 1
'.WaitForEvent rcEnterPos, "", "0", 7, 3
Loop
.TransmitTerminalKey rcIBMPf3Key
Close 2
Loop
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
Close 1
fin:
.TransmitTerminalKey rcIBMPf3Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
End With
Close 3
End Sub
Sub Hernancito_Fact_Por_Totales_Y_ABONO()
pathin = "C:\TEMP\tocata.TXT"
'InputBox("Ingrese Ruta y nombre del archivo de texto que contiene las lneas",
"Telefonia Publica")
GoTo fin
End If
fila = 11
Do While mesin <> GetDisplayText(fila, 69, 5)
fila = fila + 1
If GetDisplayText(fila, 69, 5) = " " Then
urb = 0
iur = 0
inter = 0
llur = 0
lliur = 0
GoTo fin
End If
Loop
.SetMousePos fila, 3
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.TransmitANSI "s"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Seccion.", "30", 5, 11
.TransmitANSI "rcomun"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.SetMousePos 5, 59
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Nro.Linea.", "30", 5, 48
.TransmitANSI "a" & linea
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
'-----------------------------------------------------
'Consultamos Total
fila = 9
Do While GetDisplayText(fila, 14, 5) <> "TOTAL"
fila = fila + 1
Loop
urb = .GetDisplayText(fila, 65, 11)
'------------------------sin errores---------------
'abono
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Seccion.", "30", 5, 11
.TransmitANSI "abono "
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.SetMousePos 5, 59
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Nro.Linea.", "30", 5, 48
.TransmitANSI "a" & linea
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
fila = 9
Do While GetDisplayText(fila, 26, 5) <> "TOTAL"
fila = fila + 1
Loop
abono = .GetDisplayText(fila, 68, 7)
'Consultamos Internacionales
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Seccion.", "30", 5, 11
.TransmitANSI "detint"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.SetMousePos 5, 59
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Nro.Linea.", "30", 5, 48
.TransmitANSI "a" & linea
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
fila = 6
If .GetDisplayText(9, 19, 5) = "MODO:" Then
Do While .GetDisplayText(fila, 26, 5) <> "TOTAL"
fila = fila + 1
If fila = 21 Then
fila = 6
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
End If
Loop
inter = .GetDisplayText(fila, 65, 11)
llinter = .GetDisplayText(fila, 53, 5)
Else
inter = 0
llinter = 0
End If
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
fin:
.TransmitTerminalKey rcIBMPf12Key
Print #2, linea & ";" & urb & ";" & inter & ";" & abono & ";" & mesin
Loop
Close 1
Close 2
End With
End Sub '
Sub DODDI_dispersion()
With Session
If up = 1 Then
usr = "u166898"
pwd1 = "stefi" & Format(Month(Date), "0#")
pwd = "stefi" & Format((Month(Date + 30)), "0#")
End If
If up = 2 Then
usr = "u174026"
pwd1 = "lili" & Format(Month(Date), "0#")
pwd = "lili" & Format((Month(Date + 30)), "0#")
End If
If up = 3 Then
usr = "u178121"
pwd1 = "guati" & Format(Month(Date), "0#")
pwd = "guati" & Format((Month(Date + 30)), "0#")
End If
.TransmitANSI usr
.TransmitTerminalKey rcIBMTabKey
.TransmitANSI pwd
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
If .FindText("BIENVENIDO", 1, 1) Then
.TransmitANSI pwd
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
End If
.Wait ("2")
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.TransmitANSI "wfor"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcEnterPos, "30", "0", 22, 65
.WaitForDisplayString ":", "30", 22, 63
.TransmitANSI "3"
Else
.TransmitANSI "5"
End If
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 22, 65
.WaitForDisplayString ":", "30", 22, 63
.TransmitANSI "2"
.TransmitTerminalKey rcIBMEnterKey
.WindowState = rcMaximized
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 3, 24
.WaitForDisplayString "CLIENTE:", "30", 3, 15
.TransmitTerminalKey rcIBMEnterKey
nextpage:
linea = 13
lineaint = 8
.TransmitANSI opci
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 4, 73
.WaitForDisplayString "CONSULTA:", "30", 4, 63
.TransmitANSI "ft"
.TransmitTerminalKey rcIBMEnterKey
.SetMousePos 4, 56
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcEnterPos, "30", "0", 4, 56
.TransmitANSI "c"
.TransmitTerminalKey rcIBMEnterKey
If sale = 1 Then
sale = 0
lineaint = 8
End If
lineaint = lineaint + 1
cuenta = 0
'cambio de pag si cambi antes
Do Until pagina = cuenta
.TransmitTerminalKey rcIBMPf8Key
cuenta = cuenta + 1
.WaitForEvent rcKbdEnabled, "200", "0", 1, 1
.WaitForEvent rcEnterPos, "200", "0", 21, 62
' .Wait ("5")
Loop
If lineaint = 20 Then
cpagina: If .GetDisplayText(21, 77, 3) = "+++" Then
.TransmitTerminalKey rcIBMPf8Key
pagina = pagina + 1
.WaitForEvent rcKbdEnabled, "200", "0", 1, 1
.WaitForEvent rcEnterPos, "200", "0", 21, 62
lineaint = 8
Else
sale = 1
GoTo fin
End If
End If
lineaint = lineaint + 1
Loop
opciint = .GetDisplayText(lineaint, 3, 2)
fvenc = .GetDisplayText(lineaint, 69, 12)
.WaitForEvent rcKbdEnabled, "200", "0", 1, 1
.WaitForEvent rcEnterPos, "200", "0", 21, 62
.TransmitANSI opciint
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 3, 77
.WaitForDisplayString "CONSULTA:", "30", 3, 67
'captura de datos
Print #2, CLIENTE & ";" & fcobro & ";" & importe & ";" & nfactura & ";" & fvenc &
";" & titular & ";" & freporte
.TransmitTerminalKey rcIBMPf3Key
End If
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 22, 47
.WaitForDisplayString "OPCION:", "30", 22, 39
cpage = 0
Do Until cpage = page
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "OPCION:", "30", 22, 39
cpage = cpage + 1
Loop
Loop
siguiente:
Loop
.TransmitTerminalKey rcIBMPf12Key
Close 1
Close 2
End With
End Sub
Sub DODDI_morosidad()
With Session
If up = 1 Then
usr = "u166898"
pwd1 = "stefi" & Format(Month(Date), "0#")
pwd = "stefi" & Format((Month(Date + 30)), "0#")
End If
If up = 2 Then
usr = "u174026"
pwd1 = "lili" & Format(Month(Date), "0#")
pwd = "lili" & Format((Month(Date + 30)), "0#")
End If
If up = 3 Then
usr = "u178121"
pwd1 = "guati" & Format(Month(Date), "0#")
pwd = "guati" & Format((Month(Date + 30)), "0#")
End If
.TransmitANSI usr
.TransmitTerminalKey rcIBMTabKey
.TransmitANSI pwd
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.TransmitANSI pwd
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
End If
.Wait ("2")
.TransmitTerminalKey rcIBMPf12Key
.TransmitANSI "wfor"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcEnterPos, "30", "0", 22, 65
.WaitForDisplayString ":", "30", 22, 63
End If
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 22, 65
.WaitForDisplayString ":", "30", 22, 63
.TransmitANSI "2"
.TransmitTerminalKey rcIBMEnterKey
.WindowState = rcMaximized
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 3, 24
.WaitForDisplayString "CLIENTE:", "30", 3, 15
nextpage:
.TransmitTerminalKey rcIBMEnterKey
linea = 12
.TransmitANSI opci
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 4, 73
.WaitForDisplayString "CONSULTA:", "30", 4, 63
.TransmitANSI "ft"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "COBRO:", "30", 4, 12
npag: lineaint = 9
Else
GoTo sale
End If
Loop
.TransmitTerminalKey rcIBMPf3Key
.TransmitTerminalKey rcIBMPf3Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 22, 65
.WaitForDisplayString ":", "30", 22, 63
.TransmitANSI "2"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForEvent rcEnterPos, "30", "0", 22, 47
.WaitForDisplayString "OPCION:", "30", 22, 39
cpage = 0
Do Until cpage = page
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "OPCION:", "30", 22, 39
cpage = cpage + 1
Loop
Loop
siguiente:
End Sub
Sub DODDI_facturacion()
'
' Generated by the Reflection Macro Recorder on 08-22-2001 10:44:33.80
' Generated by Reflection for IBM for Windows 8.00
'
pathin = "c:\windows\escritorio\macros\parque.txt"
logout = "c:\windows\escritorio\macros\parque sin facturacion.txt"
mes = Mid$(mesao, 1, 2)
mesemi = mes - 2
If mesemi < 10 Then mesemi = "0" & mesemi
emision = "10/" & mesemi & Mid$(mesao, 3, 3)
pathou = "c:\windows\escritorio\macros\facturacion.txt"
With Session
.SetMousePos 4, 71
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX, rcCurrent
.TransmitANSI emision
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.SetMousePos 5, 17
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitANSI CLIENTE
bandera = 0
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
' .WaitForEvent rcEnterPos, "30", "0", 5, 14
.WaitForDisplayString "Nro.Linea.:", "30", 5, 2
If .GetDisplayText(22, 7, 32) = "NUMERO DE SERVICIO NO ENCONTRADO" Then
conhoy: .SetMousePos 4, 71
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX, rcCurrent
.TransmitANSI hoy
bandera = 1
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
End If
linea = 11
vencimiento = .GetDisplayText(linea, 69, 5)
End If
linea = linea + 1
vencimiento = .GetDisplayText(linea, 69, 5)
Loop
longitud = Len(total) + 1
i = 1
bandera = False
importe = ""
'
' Generated by : Saca trafico de llamadas para calificar como grandes clientes
'
Dim pathin, TOTLINEA, pathou, cat, linea, abo, urb, iur, clie, total, afact,
bacintur, pecintur, baurcla, peurcla, bacofro, pecofro As String
Dim fila, fila1, fila2 As Integer
Dim found As Integer
Dim fact, arch As String
pathin = "c:\temp\tm.TXT"
pathou = "c:\temp\resultm.TXT"
With Session
.SetMousePos fila, 3
'&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
.TransmitTerminalKey rcIBMTabKey
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rccurrentgraphicscursosrx,
rcCurrentGraphicsCursorY
.TransmitANSI "s"
'--------- total a pagar ------------
total = .GetDisplayText(fila, 48, 13)
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
'----------------------------------------------
found = FindText("Urbana", 1, 1)
If found Then
fila = Application.FoundTextRow
urb = .GetDisplayText(fila, 66, 10)
End If
found = FindText("Interurbana", 1, 1)
If found Then
fila = Application.FoundTextRow
iur = .GetDisplayText(fila, 66, 10)
End If
'&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
'---- UTILIZO SECCIONES (tottel)---
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Seccion.", "30", 5, 11
.TransmitANSI "tottel"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
'-------------------------------------------------------------------------
' busqueda de claves en primer pantalla
'------- Buscar consumos interurbanos -----
found = FindText("Consumos Interurbanos", 1, 1)
If found Then
fila = Application.FoundTextRow
bacintur = .GetDisplayText(fila, 44, 10)
pecintur = .GetDisplayText(fila, 64, 11)
End If
'--------- Buscar urbanos y clave 1 ----
found = FindText("Consumos Urb.+ Clave 1", 1, 1)
If found Then
fila = Application.FoundTextRow
baurcla = .GetDisplayText(fila, 44, 10)
peurcla = .GetDisplayText(fila, 64, 11)
End If
'--------- Buscar consumos fronterizos----
found = FindText("Consumos Nacionales y Front", 1, 1)
If found Then
fila = Application.FoundTextRow
bacofro = .GetDisplayText(fila, 44, 10)
pecofro = .GetDisplayText(fila, 64, 11)
End If
'############################################################
'-----------fin de busqueda 1er pantalla e inicio de 2da-----
'############################################################
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
cat = Trim$(cat)
linea = Trim$(linea)
urb = Trim$(urb)
iur = Trim$(iur)
abo = Trim$(abo)
clie = Trim$(clie)
basecintur = Trim$(bacintur)
pesocintur = Trim$(pecintur)
baseurcla = Trim$(baurcla)
pesourcla = Trim$(peurcla)
total = Trim$(total)
totalfact = Trim$(totfact)
Print #2, cat & ";" & linea & ";" & urb & ";" & iur & ";" & TOTLINEA &
";" & abo & ";" & clie & ";" & basecintur & ";" & pesocintur & ";" & baseurcla &
";" & pesourcla & ";" & bacofro & ";" & pecofro & ";" & total & ";" & totalfact
Loop
Close 1
Close 2
End With
End Sub
Sub Grandes_Clientes_nuevo()
Dim pathin, pathou, linea, afact, nfact, vto, fbaj, retri, serv, total As String
Dim nombclie, clie, abo100, bacla2hr, pecla2hr, bacla2hn, pecla2hn, bacla3hr,
pecla3hr, bacla3hn, pecla3hn, bacla4hr, pecla4hr, bacla4hn, pecla4hn, bacla5hr,
pecla5hr, bacla5hn, pecla5hn, bacla612hr, pecla612hr, bacla612hn, pecla612hn,
bonif, comi, todesc, bacofro, pecofro As String
Dim totba, totpa As Long
pathin = "c:\temp\entrada.txt"
pathou = "c:\temp\salida.txt"
Dim fso As Object, file As Object
boarap = ""
afact = ""
nfact = ""
fbaj = ""
vto = ""
serv = ""
resum = ""
retri = ""
total = ""
Inicial = Inicial + 1
nomclie = ""
clie = ""
abo100 = ""
bacla2hr = ""
pecla2hr = ""
bacla2hn = ""
pecla2hn = ""
bacla3hr = ""
pecla3hr = ""
bacla3hn = ""
pecla3hn = ""
bacla4hr = ""
pecla4hr = ""
bacla4hn = ""
pecla4hn = ""
bacla5hr = ""
pecla5hr = ""
bacla5hn = ""
pecla5hn = ""
bacla612hr = ""
pecla612hr = ""
bacla612hn = ""
pecla612hn = ""
totba = ""
totpe = ""
bonif = ""
comin = ""
todesc = ""
bacofro = ""
pecofro = ""
.SetMousePos 5, 14
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForDisplayString "Nro.Linea.:", "180", 5, 2
.TransmitANSI "a"
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitTerminalKey rcIBMDeleteCharKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.TransmitANSI linea
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.WaitForDisplayString "Nro.Linea.:", "180", 5, 2
'copia el acuerdo de facturacin-----
afact = .GetDisplayText(4, 14, 10)
fbaj = .GetDisplayText(5, 71, 8)
'-------------- FIN PRIMER PANTALLA-----
.TransmitTerminalKey rcIBMPf22Key
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
'RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
dEmision = .GetDisplayText(11, 9, 8)
.SetMousePos 4, 14
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitTerminalKey rcIBMDeleteCharKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.TransmitANSI afact
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.WaitForDisplayString "Nro.Linea.:", "180", 5, 2
'HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
clie = .GetDisplayText(8, 13, 10)
nomclie = .GetDisplayText(9, 13, 49)
'HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
.TransmitTerminalKey rcIBMPf22Key
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
End If
nfact = .GetDisplayText(11, 28, 13)
vto = .GetDisplayText(11, 66, 8)
'--------ENTRAMOS EN LA ULTIMA FACTURA-----
.TransmitANSI "s"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
If GetDisplayText(4, 1, 1) = " " Then GoTo seguir
.WaitForDisplayString "Fact:", "180", 4, 1
'----CON ESTO ME TRAIGO TODO A UNA PANTALLA----
'---- UTILIZO SECCIONES (RESUM)---
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.WaitForDisplayString "Seccion.", "180", 5, 11
.TransmitANSI "resum"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
'--------buscar clave3hn----------------
found = FindText("Clave 3 Horario Normal", 1, 1)
If found Then
fila = Application.FoundTextRow
bacla3hn = .GetDisplayText(fila, 44, 10)
pecla3hn = .GetDisplayText(fila, 66, 9)
End If
'--------buscar clave4hr----------------
found = FindText("Clave 4 H. Reducido", 1, 1)
If found Then
fila = Application.FoundTextRow
bacla4hr = .GetDisplayText(fila, 44, 10)
pecla4hr = .GetDisplayText(fila, 66, 9)
End If
'--------buscar clave4hn----------------
found = FindText("Clave 4 Horario Normal", 1, 1)
If found Then
fila = Application.FoundTextRow
bacla4hn = .GetDisplayText(fila, 44, 10)
pecla4hn = .GetDisplayText(fila, 66, 9)
End If
'--------buscar clave5hr ---------
found = FindText("Clave 5 H. Reducido", 1, 1)
If found Then
fila = Application.FoundTextRow
bacla5hr = .GetDisplayText(fila, 44, 10)
pecla5hr = .GetDisplayText(fila, 66, 9)
End If
'############################################################
'-----------fin de busqueda 1er pantalla e inicio de 2da-----
'############################################################
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
'--------buscar clave612hn ---------
If bacla612hn = "" Then
found = FindText("Clave 6 a 12H. Normal", 1, 1)
If found Then
fila = Application.FoundTextRow
bacla612hn = .GetDisplayText(fila, 44, 10)
pecla612hn = .GetDisplayText(fila, 66, 9)
End If
End If
'_____________________________________________
If bacla612hr = "" Then
'--------buscar clave612hr ---------
found = FindText("Clave 6 a 12H. Reducido", 1, 1)
If found Then
fila = Application.FoundTextRow
bacla612hr = .GetDisplayText(fila, 44, 10)
pecla612hr = .GetDisplayText(fila, 66, 9)
End If
End If
'--------buscar clave612hn (con espacio)---------
If bacla612hn = "" Then
found = FindText("Clave 6 a 12 H. Normal", 1, 1)
If found Then
fila = Application.FoundTextRow
bacla612hn = .GetDisplayText(fila, 44, 10)
pecla612hn = .GetDisplayText(fila, 66, 9)
End If
End If
'--------buscar clave612hr (con espacio)---------
If bacla612hr = "" Then
found = FindText("Clave 6 a 12 H. Reducido", 1, 1)
If found Then
fila = Application.FoundTextRow
bacla612hr = .GetDisplayText(fila, 44, 10)
pecla612hr = .GetDisplayText(fila, 66, 9)
End If
End If
'--------buscar consumos fronterizos ---------
found = FindText("Consumos front/reg", 1, 1)
If found Then
fila = Application.FoundTextRow
bacofro = .GetDisplayText(fila, 44, 10)
pecofro = .GetDisplayText(fila, 66, 9)
End If
'###############################################
'sacar descuentos y promociones
'###############################################
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Seccion.", "30", 5, 11
.TransmitANSI "descue"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
'-----------------------------------------------
' - Primer pantalla -
'-----------------------------------------------
' saca abono 100%
If abo100 = "" Then
found = FindText("Dto. esp. acciones promocionales", 1, 1)
If found Then
fila = Application.FoundTextRow
abo100 = .GetDisplayText(fila, 64, 12)
End If
End If
If boarap = "" Then
found = FindText("Bonificacion Acceso Rapido", 1, 1)
If found Then
fila = Application.FoundTextRow
boarap = .GetDisplayText(fila, 64, 12)
End If
End If
End If
End If
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
If todesc = "" Then
found = FindText("TOTAL DE DESCUENTOS Y PROMOCIONES", 1, 1)
If found Then
fila = Application.FoundTextRow
todesc = .GetDisplayText(fila, 64, 12)
End If
End If
.TransmitTerminalKey rcIBMPf7Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
'###############################################
'sacar total consumos internacionales
'###############################################
' - Primer busqueda -
If comin = "" Then
found = FindText("TOTAL DE COMUNIC. INTERNACIONALES", 1, 1)
If found Then
fila = Application.FoundTextRow
comin = .GetDisplayText(fila, 64, 12)
End If
End If
'------- retrocede------------------------------
.TransmitTerminalKey rcIBMPf7Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
If comin = "" Then
found = FindText("TOTAL DE COMUNIC. INTERNACIONALES", 1, 1)
If found Then
fila = Application.FoundTextRow
comin = .GetDisplayText(fila, 64, 12)
End If
End If
'FINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFIN
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
seguir:
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
linea = Trim$(linea)
afact = Trim$(afact)
nfact = Trim$(nfact)
fbaj = Trim$(fbaj)
vto = Trim$(vto)
total = Trim$(total)
nomclie = Trim$(nomclie)
clie = Trim$(clie)
abo100 = Trim$(abo100)
boarap = Trim$(boarap)
bacla2hr = Trim$(bacla2hr)
pecla2hr = Trim$(pecla2hr)
bacla2hn = Trim$(bacla2hn)
pecla2hn = Trim$(pecla2hn)
bacla3hr = Trim$(bacla3hr)
pecla3hr = Trim$(pecla3hr)
bacla3hn = Trim$(bacla3hn)
pecla3hn = Trim$(pecla3hn)
bacla4hr = Trim$(bacla4hr)
pecla4hr = Trim$(pecla4hr)
bacla4hn = Trim$(bacla4hn)
pecla4hn = Trim$(pecla4hn)
bacla5hr = Trim$(bacla5hr)
pecla5hr = Trim$(pecla5hr)
bacla5hn = Trim$(bacla5hn)
pecla5hn = Trim$(pecla5hn)
bacla612hr = Trim$(bacla612hr)
pecla612hr = Trim$(pecla612hr)
bacla612hn = Trim$(bacla612hn)
pecla612hn = Trim$(pecla612hn)
bonif = Trim$(bonif)
comin = Trim$(comin)
todesc = Trim$(todesc)
bacofro = Trim$(bacofro)
pecofro = Trim$(pecofro)
Print #2, linea & ";" & nomclie & ";" & afact & ";" & nfact & ";" &
fbaj & ";" & vto & ";" & total & ";" & clie & ";" & abo100 & ";" & boarap & ";" &
bacla2hr & ";" & pecla2hr & ";" & bacla2hn & ";" & pecla2hn & ";" & bacla3hr & ";"
& pecla3hr & ";" & bacla3hn & ";" & pecla3hn & ";" & bacla4hr & ";" & pecla4hr &
";" & bacla4hn & ";" & pecla4hn & ";" & bacla5hr & ";" & pecla5hr & ";" & bacla5hn
& ";" & pecla5hn & ";" & bacla612hr & ";" & pecla612hr & ";" & bacla612hn & ";" &
pecla612hn & ";" & totba & ";" & totpe & ";" & bonif & ";" & comin & ";" & todesc &
";" & bacofro & ";" & pecofro
Loop
Close
'Call logPrint("### TERMINO Proceso de Importacin de List LISU ###",
Get_INI("LISU", "pathlog"))
.TransmitTerminalKey rcIBMPf3Key
.TransmitTerminalKey rcIBMPf3Key
.TransmitTerminalKey rcIBMPf3Key
Dim X
X = MsgBox("FIN DE LA MACRO", vbOKOnly)
End With
End Sub
Sub Hernancito_Fact_agrupados()
Dim pathin, pathou, linea, urb, iur, inter, mesin, vto, llur, lliur As String
Dim fila, i As Integer
Dim mes(8) As String
mes(1) = "05"
mes(2) = "04"
mes(3) = "03"
mes(4) = "02"
mes(5) = "01"
mes(6) = "12"
mes(7) = "11"
mes(8) = "10"
Do Until i = 8
i = i + 1
pathin = "C:\TEMP\tocata_agrupados.TXT"
'InputBox("Ingrese Ruta y nombre del archivo de texto que contiene las lneas",
"Telefonia Publica")
'mesin = InputBox("Ingrese el perodo a consultar(01 02...)", "Telefonia
Publica")
mesin = mes(i)
pathou = "C:\TEMP\fuga_agrupados_" & mesin & ".TXT"
'InputBox("Ingrese Ruta y nombre del archivo de texto a crear", "Telefonia
Publica")
With Session
.SetMousePos 21, 15
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForDisplayString "OPCN&SUBOPCN", "30", 21, 2
.TransmitANSI "1,1"
.TransmitTerminalKey rcIBMTabKey
.TransmitANSI "c"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
'.WaitForEvent rcEnterPos, "30", "0", 5, 14
'Ingresamos la Lnea
Do While Not EOF(1)
Line Input #1, registro
linea = Mid(registro, 1, 10)
.SetMousePos 5, 14
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForDisplayString "Nro.Linea.:", "30", 5, 2
.TransmitANSI "a"
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitANSI linea
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Nro.Linea.:", "30", 5, 2
.TransmitTerminalKey rcIBMPf22Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
'Seleccionamos Perodo
If GetDisplayText(22, 2, 6) <> " " Then
urb = 0
iur = 0
inter = 0
llur = 0
lliur = 0
GoTo fin
End If
fila = 11
Do While mesin <> GetDisplayText(fila, 69, 2)
fila = fila + 1
If GetDisplayText(fila, 69, 2) = " " Then
urb = 0
iur = 0
inter = 0
llur = 0
lliur = 0
GoTo fin
End If
Loop
.SetMousePos fila, 3
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.TransmitANSI "s"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
If .GetDisplayText(22, 7, 15) = "FACTURA MIGRADA" Then GoTo fin
'Consultamos Nacionales
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Seccion.", "30", 5, 11
.TransmitANSI "rcomun"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.SetMousePos 5, 59
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Nro.Linea.", "30", 5, 48
.TransmitANSI "a" & linea
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
'-----------------------------------------------------
'Consultamos Urbanas
fila = 9
If GetDisplayText(fila, 16, 6) = "Urbana" Then
urb = .GetDisplayText(fila, 65, 11)
llur = .GetDisplayText(fila, 53, 5)
fila = fila + 1
Else
urb = 0
llur = 0
End If
'Consultamos Interubanas
If GetDisplayText(fila, 16, 11) = "Interurbana" Then
iur = .GetDisplayText(fila, 65, 11)
lliur = .GetDisplayText(fila, 53, 5)
Else
iur = 0
lliur = 0
End If
'------------------------sin errores---------------
'Consultamos Internacionales
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Seccion.", "30", 5, 11
.TransmitANSI "detint"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.SetMousePos 5, 59
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
.WaitForDisplayString "Nro.Linea.", "30", 5, 48
.TransmitANSI "a" & linea
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
fila = 6
If .GetDisplayText(9, 19, 5) = "MODO:" Then
Do While .GetDisplayText(fila, 26, 5) <> "TOTAL"
fila = fila + 1
If fila = 21 Then
fila = 6
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
End If
Loop
inter = .GetDisplayText(fila, 65, 11)
llinter = .GetDisplayText(fila, 53, 5)
Else
inter = 0
llinter = 0
End If
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
fin:
.TransmitTerminalKey rcIBMPf12Key
Print #2, linea & ";" & urb & ";" & iur & ";" & inter & ";" & llur &
";" & lliur
Loop
Close 1
Close 2
End With
Loop
End Sub
Sub Estudio_de_trafico()
Dim pathin, pathou, linea, afact, nfact, vto, fbaj, retri, serv, total As String
Dim nombclie, clie, abo100, pecla2hr, pecla2hn, pecla3hr, pecla3hn, pecla4hr,
pecla4hn, pecla5hr, pecla5hn, pecla612hr, pecla612hn, bonif, comi, todesc, bacofro,
pecofro, Curbmul, Durbmul, Curbnor, Durbnor, Curbred, Durbred, Cc1mul, Dc1mul,
Pc1mul, Cc1nor, DC1nor, Pc1nor, CC1red, DC1red, Pc1red, Cc2mul, Dc2mul, P2mul,
Cc2nor, DC2nor, Pc2nor, C2red, DC2red, Pc2red, Cc3mul, Dc3mul, Pc3mul, Cc3nor,
DC3nor, Pc3nor, CC3red, DC3red, Pc3red, Cc4mul, Dc4mul, Pc4mul, Cc4nor, DC4nor,
Pc4nor, CC4red, DC4red, Pc4red, Cc5mul, Dc5mul, Pc5mul, Cc5nor, DC5nor, CC5red,
DC5red, Pc5red, Cc6mul, Dc6mul, Pc6mul, Cc6nor, DC6nor, Pc6nor, CC6red, DC6red,
Pc6red, baseurb, peurb As String
Dim totba, totpa As Long
pathin = "c:\temp\entrada.txt"
pathou = "c:\temp\trafico_genesis_ene.txt"
boarap = ""
afact = ""
nfact = ""
fbaj = ""
vto = ""
serv = ""
resum = ""
retri = ""
total = ""
Inicial = Inicial + 1
nomclie = ""
clie = ""
abo100 = ""
pecla2hr = ""
pecla2hn = ""
pecla3hr = ""
pecla3hn = ""
pecla4hr = ""
pecla4hn = ""
pecla5hr = ""
pecla5hn = ""
pecla612hr = ""
pecla612hn = ""
'totba = ""
totpe = ""
bonif = ""
comin = ""
todesc = ""
bacofro = ""
pecofro = ""
Curbmul = ""
Durbmul = ""
Curbnor = ""
Durbnor = ""
Curbred = ""
Durbred = ""
Cc1mul = ""
Dc1mul = ""
Cc1nor = ""
DC1nor = ""
CC1red = ""
DC1red = ""
Cc2mul = ""
Dc2mul = ""
Pc2mul = ""
Cc2nor = ""
DC2nor = ""
Pc2nor = ""
CC2red = ""
DC2red = ""
Pc2red = ""
Cc3mul = ""
Dc3mul = ""
Pc3mul = ""
Cc3nor = ""
DC3nor = ""
Pc3nor = ""
CC3red = ""
DC3red = ""
Pc3red = ""
Cc4mul = ""
Dc4mul = ""
Pc4mul = ""
Cc4nor = ""
DC4nor = ""
Pc4nor = ""
CC4red = ""
DC4red = ""
Pc4red = ""
Cc5mul = ""
Dc5mul = ""
Pc5mul = ""
Cc5nor = ""
DC5nor = ""
Pc5nor = ""
CC5red = ""
DC5red = ""
Pc5red = ""
Cc6mul = ""
Dc6mul = ""
Pc6mul = ""
Cc6nor = ""
DC6nor = ""
Pc6nor = ""
CC6red = ""
DC6red = ""
Pc6red = ""
baseurb = ""
peurb = ""
.SetMousePos 5, 14
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForDisplayString "Nro.Linea.:", "180", 5, 2
.TransmitANSI "a"
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitTerminalKey rcIBMDeleteCharKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.TransmitANSI linea
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.WaitForDisplayString "Nro.Linea.:", "180", 5, 2
'copia el acuerdo de facturacin-----
afact = .GetDisplayText(4, 14, 10)
fbaj = .GetDisplayText(5, 71, 8)
'-------------- FIN PRIMER PANTALLA-----
.TransmitTerminalKey rcIBMPf22Key
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
'RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
dEmision = .GetDisplayText(11, 9, 8)
.SetMousePos 4, 14
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitTerminalKey rcIBMDeleteCharKey
.TransmitTerminalKey rcIBMDeleteCharKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.TransmitANSI afact
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.WaitForDisplayString "Nro.Linea.:", "180", 5, 2
'HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
clie = .GetDisplayText(8, 13, 10)
nomclie = .GetDisplayText(9, 13, 49)
'HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
.TransmitTerminalKey rcIBMPf22Key
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
End If
nfact = .GetDisplayText(13, 28, 13)
vto = .GetDisplayText(13, 66, 8)
'vto = .GetDisplayText(11, 66, 8)
'--------ENTRAMOS EN LA ULTIMA FACTURA-----
.TransmitTerminalKey rcIBMTabKey 'para entrar a la factura anterior
.TransmitTerminalKey rcIBMTabKey
.TransmitANSI "s"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
If GetDisplayText(4, 1, 1) = " " Then GoTo seguir
.WaitForDisplayString "Fact:", "180", 4, 1
control = 1
BUSCA: If FindText("Comunicaciones Urbanas", 1, 1) Then
fila = Application.FoundTextRow
If fila >= 20 Then
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
fila = "7"
Else
fila = fila + 1
End If
Else
If .GetDisplayText(fila, 20, 10) = "Normal "
Then
fila = Application.FoundTextRow
Curbnor = .GetDisplayText(fila, 35, 10)
Durbnor = .GetDisplayText(fila, 53, 9)
Else
If .GetDisplayText(fila, 20, 10) =
"Reducida " Then
fila = Application.FoundTextRow
Curbred = .GetDisplayText(fila, 35, 10)
Durbred = .GetDisplayText(fila, 53, 9)
End If
End If
End If
Else
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
GoTo BUSCA
End If
fila = "7"
Else
fila = fila + 1
End If
Else
If .GetDisplayText(fila, 20, 10) = "Reducida "
Then
fila = Application.FoundTextRow
Curbred = .GetDisplayText(fila, 35, 10)
Durbred = .GetDisplayText(fila, 53, 9)
End If
End If
End If
proximo: control = 1
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.WaitForDisplayString "Seccion.", "180", 5, 11
.TransmitANSI "ESTFAC"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
Else
If .GetDisplayText(fila, 20, 10) = "Normal "
Then
Else
If .GetDisplayText(fila, 20, 10) =
"Reducida " Then
End If
End If
End If
Else
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
fila = "7"
Else
fila = fila + 1
End If
If .GetDisplayText(fila, 20, 10) = "Normal " Then
Cc1nor = .GetDisplayText(fila, 35, 10)
DC1nor = .GetDisplayText(fila, 53, 9)
Else
If .GetDisplayText(fila, 20, 10) = "Reducida "
Then
End If
End If
fila = "7"
Else
fila = fila + 1
End If
End If
PROXIMO1: control = 1
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.WaitForDisplayString "Seccion.", "180", 5, 11
.TransmitANSI "ESTFAC"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
GoTo BUSCA2
End If
End If
PROXIMO2: control = 1
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.WaitForDisplayString "Seccion.", "180", 5, 11
.TransmitANSI "ESTFAC"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
PROXIMO3: control = 1
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.WaitForDisplayString "Seccion.", "180", 5, 11
.TransmitANSI "ESTFAC"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
GoTo BUSCA4
End If
PROXIMO4: control = 1
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.WaitForDisplayString "Seccion.", "180", 5, 11
.TransmitANSI "ESTFAC"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
GoTo BUSCA5
End If
PROXIMO5: control = 1
.SetMousePos 5, 20
.TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
.GraphicsMouse rcLeftClick, rcCurrentGraphicsCursorX,
rcCurrentGraphicsCursorY
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
.WaitForDisplayString "Seccion.", "180", 5, 11
.TransmitANSI "ESTFAC"
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
GoTo BUSCA6
End If
'--------buscar clave3hn----------------
found = FindText("Clave 3 Horario Normal", 1, 1)
If found Then
fila = Application.FoundTextRow
pecla3hn = .GetDisplayText(fila, 66, 9)
End If
'-------- buscar clave4hr ----------------
found = FindText("Clave 4 H. Reducido", 1, 1)
If found Then
fila = Application.FoundTextRow
pecla4hr = .GetDisplayText(fila, 66, 9)
End If
'############################################################
'-----------fin de busqueda 1er pantalla e inicio de 2da-----
'############################################################
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
'--------buscar clave612hn ---------
If bacla612hn = "" Then
found = FindText("Clave 6 a 12 H. Normal", 1, 1)
If found Then
fila = Application.FoundTextRow
pecla612hn = .GetDisplayText(fila, 66, 9)
End If
End If
'_____________________________________________
If bacla612hr = "" Then
'--------buscar clave612hr ---------
found = FindText("Clave 6 a 12 H. Reducido", 1, 1)
If found Then
fila = Application.FoundTextRow
pecla612hr = .GetDisplayText(fila, 66, 9)
End If
End If
'-------- busca consumos urbanos ---------
End If
End If
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
If todesc = "" Then
found = FindText("TOTAL DE DESCUENTOS Y PROMOCIONES", 1, 1)
If found Then
fila = Application.FoundTextRow
todesc = .GetDisplayText(fila, 64, 12)
End If
End If
.TransmitTerminalKey rcIBMPf7Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
'###############################################
'sacar total consumos internacionales
'###############################################
' - Primer busqueda -
If comin = "" Then
found = FindText("TOTAL DE COMUNIC. INTERNACIONALES", 1, 1)
If found Then
fila = Application.FoundTextRow
comin = .GetDisplayText(fila, 64, 12)
End If
End If
'------- retrocede------------------------------
.TransmitTerminalKey rcIBMPf7Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
If comin = "" Then
found = FindText("TOTAL DE COMUNIC. INTERNACIONALES", 1, 1)
If found Then
fila = Application.FoundTextRow
comin = .GetDisplayText(fila, 64, 12)
End If
End If
'FINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFINFIN
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
seguir:
.TransmitTerminalKey rcIBMPf12Key
.WaitForEvent rcKbdEnabled, "180", "0", 1, 1
linea = Trim$(linea)
afact = Trim$(afact)
nfact = Trim$(nfact)
fbaj = Trim$(fbaj)
vto = Trim$(vto)
total = Trim$(total)
nomclie = Trim$(nomclie)
clie = Trim$(clie)
abo100 = Trim$(abo100)
boarap = Trim$(boarap)
pecla2hr = Trim$(pecla2hr)
pecla2hn = Trim$(pecla2hn)
pecla3hr = Trim$(pecla3hr)
pecla3hn = Trim$(pecla3hn)
pecla4hr = Trim$(pecla4hr)
pecla4hn = Trim$(pecla4hn)
pecla5hr = Trim$(pecla5hr)
pecla5hn = Trim$(pecla5hn)
pecla612hr = Trim$(pecla612hr)
pecla612hn = Trim$(pecla612hn)
bonif = Trim$(bonif)
comin = Trim$(comin)
todesc = Trim$(todesc)
bacofro = Trim$(bacofro)
pecofro = Trim$(pecofro)
Curbmul = Trim$(Curbmul)
Durbmul = Format(Trim$(Durbmul), "00" & hhmm)
Curbnor = Trim$(Curbnor)
hb = Format((Trim$(Durbnor)), hhmmss)
Curbred = Trim$(Curbred)
Durbred = Trim$(Durbred)
Cc1mul = Trim$(Cc1mul)
Dc1mul = Trim$(Dc1mul)
Cc1nor = Trim$(Cc1nor)
DC1nor = Trim$(DC1nor)
CC1red = Trim$(CC1red)
DC1red = Trim$(DC1red)
Cc2mul = Trim$(Cc2mul)
Dc2mul = Trim$(Dc2mul)
Pc2mul = Trim$(Pc2mul)
Cc2nor = Trim$(Cc2nor)
DC2nor = Trim$(DC2nor)
Pc2nor = Trim$(Pc2nor)
CC2red = Trim$(CC2red)
DC2red = Trim$(DC2red)
Pc2red = Trim$(Pc2red)
Cc3mul = Trim$(Cc3mul)
Dc3mul = Trim$(Dc3mul)
Pc3mul = Trim$(Pc3mul)
Cc3nor = Trim$(Cc3nor)
DC3nor = Trim$(DC3nor)
Pc3nor = Trim$(Pc3nor)
CC3red = Trim$(CC3red)
DC3red = Trim$(DC3red)
Pc3red = Trim$(Pc3red)
Cc4mul = Trim$(Cc4mul)
Dc4mul = Trim$(Dc4mul)
Pc4mul = Trim$(Pc4mul)
Cc4nor = Trim$(Cc4nor)
DC4nor = Trim$(DC4nor)
Pc4nor = Trim$(Pc4nor)
CC4red = Trim$(CC4red)
DC4red = Trim$(DC4red)
Pc4red = Trim$(Pc4red)
Cc5mul = Trim$(Cc5mul)
Dc5mul = Trim$(Dc5mul)
Pc5mul = Trim$(Pc5mul)
Cc5nor = Trim$(Cc5nor)
DC5nor = Trim$(DC5nor)
Pc5nor = Trim$(Pc5nor)
CC5red = Trim$(CC5red)
DC5red = Trim$(DC5red)
Pc5red = Trim$(Pc5red)
Cc6mul = Trim$(Cc6mul)
Dc6mul = Trim$(Dc6mul)
Pc6mul = Trim$(Pc6mul)
Cc6nor = Trim$(Cc6nor)
DC6nor = Trim$(DC6nor)
Pc6nor = Trim$(Pc6nor)
CC6red = Trim$(CC6red)
DC6red = Trim$(DC6red)
Pc6red = Trim$(Pc6red)
baseurb = Trim$(baseurb)
peurb = Trim$(peurb)
Print #2, linea & ";" & nomclie & ";" & afact & ";" & nfact & ";" & fbaj & ";" &
vto & ";" & total & ";" & clie & ";" & abo100 & ";" & boarap & ";" & pecla2hr & ";"
& pecla2hn & ";" & pecla3hr & ";" & pecla3hn & ";" & pecla4hr & ";" & pecla4hn &
";" & pecla5hr & ";" & pecla5hn & ";" & pecla612hr & ";" & pecla612hn & ";" & totpe
& ";" & bonif & ";" & comin & ";" & todesc & ";" & bacofro & ";" & pecofro & ";" &
Curbmul & ";" & Durbmul & ";" & Curbnor & ";" & Durbnor & ";" & Curbred & ";" &
Durbred & ";" & Cc1mul & ";" & Dc1mul & ";" & Cc1nor & ";" & DC1nor & ";" & CC1red
& ";" & DC1red & ";" & Cc2mul & ";" & Dc2mul & ";" & Pc2mul & ";" & Cc2nor & ";" &
DC2nor & ";" & Pc2nor & ";" & CC2red & ";" & DC2red & ";" & Pc2red & ";" & Cc3mul &
";" & Dc3mul & ";" & Pc3mul & ";" & Cc3nor & ";" & DC3nor & ";" & Pc3nor & ";" &
CC3red & ";" & DC3red & ";" & Pc3red & ";" & Cc4mul & ";" & Dc4mul & ";" & Pc4mul &
";" & Cc4nor & ";" & DC4nor _
& ";" & Pc4nor & ";" & CC4red & ";" & DC4red & ";" & Pc4red & ";" & Cc5mul & ";" &
Dc5mul & ";" & Pc5mul & ";" & Cc5nor & ";" & DC5nor & ";" & Pc5nor & ";" & CC5red &
";" & DC5red & ";" & Pc5red & ";" & Cc6mul & ";" & Dc6mul & ";" & Pc6mul & ";" &
Cc6nor & ";" & DC6nor & ";" & Pc6nor & ";" & CC6red & ";" & DC6red & ";" & Pc6red &
";" & baseurb & ";" & peurb
Loop
Close
'Call logPrint("### TERMINO Proceso de Importacin de List LISU ###",
Get_INI("LISU", "pathlog"))
.TransmitTerminalKey rcIBMPf3Key
.TransmitTerminalKey rcIBMPf3Key
.TransmitTerminalKey rcIBMPf3Key
Dim X
X = MsgBox("FIN DE LA MACRO", vbOKOnly)
End With
End Sub
Sub Prefacturacion()
'
' Generated by the Reflection Macro Recorder on 02-06-2004 10:04:41.23
' Generated by Reflection for IBM for Windows 8.00
'
With Session
.TransmitTerminalKey rcIBMPf8Key
.WaitForEvent rcKbdEnabled, "30", "0", 1, 1
Loop