Escolar Documentos
Profissional Documentos
Cultura Documentos
SendMode Input ; Recommended for new scripts due to its superior speed and
reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
#MaxThreadsPerHotkey 2 ; ------------->>> possibilitar dar reload no script
enquanto está rodando
; variaveis globais
global PVT =
global Matricula_PVT =
global Codigo_Servico =
global Servico =
guiTelaInicial()
{
tamanho_listbox := 33*14
posicionamento_1 := tamanho_listbox + 1
posicionamento_2 := tamanho_listbox + 20
posicionamento_3 := tamanho_listbox + 20 + 30
MotorIBM(Action)
{
if (Action == "Alteracao_Config_Fac_CFM")
{
ToolTip, F1-2-3-1, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, 2418
Send, {Enter}
Send, {F1}
Send, 2
send, {Enter}
send, 3
send, {Enter}
send, 1
send, {Enter}
}
else if (Action == "Alteracao_Fac_Sem_Emissao_CFM")
{
ToolTip, F1-2-2-1-2, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, 2418
Send, {Enter}
Send, {F1}
Send, 2
send, {Enter}
send, 2
send, {Enter}
send, 1
send, {Enter}
send, 2
send, {Enter}
}
else if (Action == "Alteracao_Informacoes_Tronco_CFM")
{
ToolTip, F1-2-3-2, 560, 20
SetTimer, RemoveToolTip, 3000
send, {F12}
send, {F12}
send, {F12}
send, {F12}
send, {F12}
send, {F12}
send, {F12}
send, {F12}
send, 2418
send, {Enter}
Send, {F1}
send, 2
send, {Enter}
send, 3
send, {Enter}
send, 2
send, {Enter}
}
else if (Action == "Alteracao_Nivel_Fac_CFM")
{
ToolTip, F1-2-3-3, 560, 20
SetTimer, RemoveToolTip, 3000
send, {F12}
send, {F12}
send, {F12}
send, {F12}
send, {F12}
send, {F1}
send, {F12}
send, {F12}
send, {F12}
send, 2418
send, {Enter}
send, {F1}
send, 2
send, {Enter}
send, 3
send, {Enter}
send, 3
send, {Enter}
}
else if (Action == "Alteracao_T&C_Dados_CFM")
{
ToolTip, F1-2-1-3, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
send, {Enter}
Send, {F1}
send, 2
send, {Enter}
send, 1
send, {Enter}
send, 3
send, {Enter}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, 2014
Send, 9999
send, RAFACN
Send, {Tab}
FormatTime, Time,, ddMMyyyy
Send,%Time%
Send,%Time%
send, RCE AM MT
Send, {Tab}
send, s
Send, {Tab}
}
else if (Action == "Associar_Designacao_Servico_CFM")
{
ToolTip, F6-8-1, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F6}
send, 8
Send, {Enter}
send, 1
Send, {Enter}
}
else if (Action == "Ativacao_Troncos_Acesso_CFM")
{
ToolTip, F1-2-1-1, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
send, {Enter}
Send, {F1}
send, 2
send, {Enter}
send, 1
send, {Enter}
send, 1
send, {Enter}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
send, {Tab}
send, rce am mt
Send, {Tab}
send, RAFACN
Send, {Tab}
;~ send, xxxx16e1
Send, {Tab}
;~ send, coloca
Send, {Tab}
Send, {Tab}
Send, {Tab}
send, rede acesso0093
send, {Tab}
send, {Tab}
send, {Tab}
send, {Tab}
}
else if (Action == "Ativacao_Troncos_Servico_CFM")
{
InsidePreenchido = 0
PVT =
Matricula_PVT =
Codigo_Servico =
Servico =
guiEscolha_PVT_e_Servico(InsidePreenchido) ; ipip
associa_PVT_e_Servico(Matricula_PVT,Codigo_Servico)
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
send, {Enter}
Send, {F1}
send, 2
send, {Enter}
send, 1
send, {Enter}
send, 1
send, {Enter}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
send, {Tab}
send, rce am at
Send, {Tab}
send, %PVT%
if (strlen(%PVT%) < 9)
send, {Tab}
;~ send, xxxx16e1
Send, {Tab}
;~ send, coloca
Send, {Tab}
Send, {Tab}
Send, {Tab}
send, rede DADOS %Codigo_Servico%
send, {Tab}
send, {Tab}
send, {Tab}
send, {Tab}
}
else if (Action == "Cancelamento_Item_OTS_CFM")
{
ToolTip, F1-2-2-1-3, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
send, {Enter}
Send, {F1}
send, 2
send, {Enter}
send, 2
send, {Enter}
send, 1
send, {Enter}
send, 3
send, {Enter}
}
else if(Action == "Consulta_Agrupamento_CFM")
{
ToolTip, F3-14-12, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, 2418
Send, {Enter}
Send, {F3}
Send, 14
Send, {Enter}
Send, 12
Send, {Enter}
}
else if (Action == "Consulta_Bandas_Estacao_CFM")
{
ToolTip, F3-14-10, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
send, 14
Send, {Enter}
send, 10
Send, {Enter}
send, rce agpane
}
else if (Action == "Consulta_Degrau_COM")
{
ToolTip, COM-2118-15, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
sleep 100
Send, {Delete}
Send, {Delete}
send, f
send, {Enter}
send, com
send, {Enter}
sleep 2000
send, 2118
send, {Enter}
send, 15
send, {Enter}
}
else if (Action == "Consulta_Execucao_OTS")
{
ToolTip, F3-16-16, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
Send, {Enter}
send, 16
Send, {Enter}
send, 16
Send, {Enter}
}
else if (Action == "Consulta_Facilidades_Vagas_CFM")
{
ToolTip, F3-15-6, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
send, 15
Send, {Enter}
send, 6
Send, {Enter}
send, RCE AMLINE
Send, {Tab}
send, GP
Send, {Tab}
}
else if (Action == "Consulta_OTS_CFM")
{
ToolTip, F3-14-6, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
send, 14
Send, {Enter}
send, 6
Send, {Enter}
}
else if (Action == "Consulta_OTS_CFM_2")
{
ToolTip, F1-2-2-4, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F1}
send, 2
Send, {Enter}
send, 2
Send, {Enter}
send, 4
Send, {Enter}
}
else if (Action == "Consulta_OTS_PorCliente_CFM")
{
ToolTip, F3-14-2, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
send, 14
Send, {Enter}
send, 2
Send, {Enter}
}
else if (Action == "Consulta_OTS_Pendentes_Fechamento")
{
ToolTip, F1-2-2-1-1-F1, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F1}
send, 2
Send, {Enter}
send, 2
Send, {Enter}
send, 1
Send, {Enter}
send, 1
Send, {Enter}
Send, {F1}
}
else if (Action == "Consulta_OTS_Retornada_CFM")
{
ToolTip, F3-14-9, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
send, 14
Send, {Enter}
send, 9
Send, {Enter}
}
else if (Action == "Consulta_Pendencia_OTS")
{
ToolTip, F3-16-7-1, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
send, 16
Send, {Enter}
send, 7
Send, {Enter}
send, 1
Send, {Enter}
}
else if (Action == "Consulta_Por_Capacidade_Por_Estacao_CFM")
{
ToolTip, F3-14-16, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
send, 14
Send, {Enter}
send, 16
Send, {Enter}
send, 6340m
Send, {Tab}
send, rce am
}
else if (Action == "Consulta_Tronco_CFM")
{
ToolTip, F3-14-1, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
send, 14
Send, {Enter}
send, 1
Send, {Enter}
}
else if (Action == "Desassociar_Designacao_Servico_CFM")
{
ToolTip, F6-8-3, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F6}
send, 8
Send, {Enter}
send, 3
Send, {Enter}
}
else if (Action == "Desativacao_Troncos_CFM")
{
ToolTip, F1-2-1-2, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F1}
send, 2
Send, {Enter}
send, 1
Send, {Enter}
send, 2
Send, {Enter}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, 2014
Send, 9999
send, RAFACN
Send, {Tab}
FormatTime, Time,, ddMMyyyy
Send,%Time%
Send,%Time%
send, Inclusao de cliente no anel
Send, {Tab}
}
else if (Action == "Consulta_Endereco_CFM")
{
ToolTip, F3-17-1, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
send, 17
Send, {Enter}
send, 1
Send, {Enter}
}
else if (Action == "Consulta_Estacao_CFM")
{
ToolTip, F3-13-6, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
send, 13
Send, {Enter}
send, 6
Send, {Enter}
Send, {Tab}
Send, {Tab}
Send, {Tab}
send, x
Send, +{Tab}
Send, +{Tab}
Send, +{Tab}
Send, +{Tab}
}
else if (Action == "Escreve_CFs_Envolvidos_Acesso_RCE")
{
send, {Home}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, {Home}
send, RCE AM MT
Send, {Home}
send, {Down}
Send, BSA GR MT
send, {Home}
send, {Down}
send, {Down}
}
else if (Action == "Escreve_CFs_Envolvidos_Servico_RCE")
{
send, {Home}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, {Home}
send, RCE AM MT
Send, {Home}
send, {Down}
Send, RCE AM AT
send, {Home}
send, {Down}
send, {Down}
Send, BSA GR MT
send, {Home}
send, {Down}
send, {Down}
send, {Down}
}
else if (Action == "Escreve_CFs_Envolvidos_Acesso_MCO")
{
send, {Home}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, {Home}
send, MCO MS MT
Send, {Home}
send, {Down}
Send, BSA GR MT
send, {Home}
send, {Down}
send, {Down}
}
else if (Action == "Escreve_CFs_Envolvidos_Acesso_JPA")
{
send, {Home}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, ^E
sleep 50
send, {Down}
send, {Home}
send, JPA TR MT
Send, {Home}
send, {Down}
Send, BSA GR MT
send, {Home}
send, {Down}
send, {Down}
}
else if (Action == "Fechamento_OTS_CFM")
{
ToolTip, F1-2-2-1-1, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F1}
send, 2
Send, {Enter}
send, 2
Send, {Enter}
send, 1
Send, {Enter}
send, 1
Send, {Enter}
}
else if (Action == "Inclusao_Estacao_CFM")
{
ToolTip, F1-3-12, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F1}
send, 3
Send, {Enter}
send, 1
Send, {Enter}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
send, snrce am mt
Send, {Tab}
Send, {Tab}
Send, {Tab}
send, rce am mt
Send, {Tab}
Send, {Tab}
Send, {Tab}
Send, {Tab}
send, rce am at
}
else if (Action == "Login")
{
FileReadLine, linha_Usuario, %Endereco_Arquivo%, 1
FileReadLine, linha_Senha, %Endereco_Arquivo%, 2
FileReadLine, linha_Perfil, %Endereco_Arquivo%, 3
StringReplace, Usuario, linha_Usuario, Login:,, All ; a ser usado no
login
StringReplace, Senha, linha_Senha, Senha:,, All ; a ser usado no
login ; sobrescrito no OK
StringReplace, Perfil, linha_Perfil, Perfil:,, All ; Utilizado na GUI;
sobrescrito na GUI.
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F3}
send, %Usuario%
Send, {Tab}
if (Senha != "")
{
send, %Senha%
Send, {Enter}
Send, !c ;key clear
send, %Perfil%
Send, {Enter}
Send, !c ;key clear
send, 2418
Send, {Enter}
}
else
{
msgbox, Nenhuma Senha cadastrada. Verifique se você possui disco
D:/. Caso possua, cadastre sua senha no menu principal do IBM Simples.`nPedimos
desculpas pelo inconviniente.
}
}
else if (Action == "OTS_Radio_CFM")
{
ToolTip, F1-2-1-5-1-1, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F1}
send, 2
Send, {Enter}
send, 1
Send, {Enter}
send, 5
Send, {Enter}
send, 1
Send, {Enter}
send, 1
Send, {Enter}
Send, {Tab}
Send, {Tab}
send, 1
Send, {Tab}
Send, {Tab}
send, X
Send, {Tab}
send, X
Send, +{Tab}
Send, +{Tab}
Send, +{Tab}
Send, +{Tab}
Send, +{Tab}
Send, +{Tab}
Send, +{Tab}
}
else if (Action == "Reserva_Fac_CFM")
{
ToolTip, F1-1-F1, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F1}
send, 1
Send, {Enter}
Send, {F1}
}
else if (Action == "Retorna_OTS_CFM")
{
ToolTip, F1-2-2-2-4, 560, 20
SetTimer, RemoveToolTip, 3000
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F1}
send, 2
Send, {Enter}
send, 2
Send, {Enter}
send, 2
Send, {Enter}
send, 4
Send, {Enter}
}
return
RemoveToolTip:
;~ SetTimer, RemoveToolTip, Off
ToolTip
return
Submitt: ; ipip
guicontrolget, PVT
guicontrolget, Servico
;~ gui, EscolhaPVTeServico:Submit
gui, EscolhaPVTeServico:destroy
InsidePreenchido = 1
return
}
return
#F1::
{
;~ ------------------
global f_size=12
gosub, INICIO
return
;~ #F11::
;~ f_size +=2
;~ Gui,destroy
;~ gosub, INICIO
;~ return
;~ #F12::
;~ f_size -=2
;~ Gui,destroy
;~ gosub, INICIO
;~ return
;~ ------------------
INICIO:
guiTelaInicial()
Gui, Show
return
MyListBox:
if A_GuiEvent = Normal ; <> DoubleClick
{
GuiControlGet, MyListBox
Action = %MyListBox%
gui, destroy
MotorIBM(Action)
}
return
PegaSenha_BtOK:
GuiControlGet, SenhaIBM
AcessoRapido_1_1:
gui, destroy
MotorIBM("Escreve_CFs_Envolvidos_Servico_RCE")
return
AcessoRapido_1_2:
gui, destroy
MotorIBM("Escreve_CFs_Envolvidos_Acesso_RCE")
return
AcessoRapido_1_3:
gui, destroy
Consulta_Centros_Funcionais_Status_e_OTS()
return
AcessoRapido_2_1:
gui, destroy
MotorIBM(AcaoRapida_2_1) ; "Login"
return
AcessoRapido_2_2:
gui, destroy
MotorIBM(AcaoRapida_2_2) ; "Consulta_Tronco_CFM"
return
AcessoRapido_2_3:
gui, destroy
MotorIBM(AcaoRapida_2_3) ; "Consulta_Agrupamento_CFM"
return
AcessoRapido_2_4:
gui, destroy
MotorIBM(AcaoRapida_2_4) ; "Consulta_Endereco_CFM"
return
AcessoRapido_2_5:
gui, destroy
MotorIBM(AcaoRapida_2_5) ; "Consulta_Estacao_CFM"
return
GuiClose:
GuiEscape:
gui, destroy
return
}
return
If (Servico == "BLD")
Codigo_Servico = 0057
else if (Servico == "MPLS")
Codigo_Servico = 0228
else if (Servico == "VIPLINE")
Codigo_Servico = 0123
else if (Servico == "VIPPHONE")
Codigo_Servico = 0123
else if (Servico == "VBL")
Codigo_Servico = 0232
else if (Servico == "INTERNET")
Codigo_Servico = 0023
else if (Servico == "PRIMELINK")
Codigo_Servico = 0001
else if (Servico == "IP VPN")
Codigo_Servico = 0165
else if (Servico == "RUD MPLS")
Codigo_Servico = 0189
else if (Servico == "VIPLINE IP")
Codigo_Servico = 0195
else if (Servico == "VIPUNICO")
Codigo_Servico = 0227
else if (Servico == "LAN TO LAN")
Codigo_Servico = 0197
else if (Servico == "VIP ESPECIAL")
Codigo_Servico = 0219
else if (Servico == "VIPSIP")
Codigo_Servico = 0264
else if (Servico == "GER DATACOM")
Codigo_Servico = 0202
else if (Servico == "GER TELLABS")
Codigo_Servico = 0211
}
return
#F2::
{
msgbox, %PVT%
send, %Matricula_PVT%
}
return
;~ apagar depois
#F7::
{
;~ else if WinExist("ahk_exe qws3270x.exe") ; qws3270s.exe > "processo" ativo
no gerenciador de tarefas > aba processos.
;~ WinActivate, ahk_exe qws3270s.exe
;~
-----------------------------------------------------------------------------------
------------
;~ UniqueID := WinExist("WinTitle", "WinText", "ExcludeTitle", "ExcludeText")
;~
-----------------------------------------------------------------------------------
------------
;~ WinGet, active_pid, PID, A
;~ msgbox, %active_pid%
;~ Process, priority, %NewPID%, High
;~
-----------------------------------------------------------------------------------
------------
;~ if WinExist("ahk_exe qws3270s.exe") ; qws3270s.exe > "processo" ativo no
gerenciador de tarefas > aba processos.
;~ WinActivate, ahk_exe qws3270s.exe
;~
-----------------------------------------------------------------------------------
------------
; Example #2: This will visit all windows on the entire system and display info
about each of them:
WinGet, id, list,,, Program Manager
Loop, %id%
{
this_id := id%A_Index%
WinActivate, ahk_id %this_id%
WinGetClass, this_class, ahk_id %this_id%
WinGetTitle, this_title, ahk_id %this_id%
MsgBox, 4, , Visiting All Windows`n%a_index% of %id%`nahk_id %this_id
%`nahk_class %this_class%`n%this_title%`n`nContinue?
IfMsgBox, NO, break
}
;~
-----------------------------------------------------------------------------------
------------
;~ Gui, Add, ListView, x2 y0 w400 h500, Process Name|Command Line
;~ for process in ComObjGet("winmgmts:").ExecQuery("Select * from Win32_Process")
;~ LV_Add("", process.Name, process.CommandLine)
;~ Gui, Show,, Process List
;~
-----------------------------------------------------------------------------------
------------
;~ MouseGetPos,,, id
;~ if WinExist("ahk_class Notepad ahk_id " id)
;~ MsgBox The mouse is over Notepad.
;~
-----------------------------------------------------------------------------------
------------
}
return
Consulta_Centros_Funcionais_Status_e_OTS()
{
Tronco_Escolhido_Consulta := clipboard
if Tronco_Escolhido_Consulta not contains VC4S,0480N,16E1
{
msgbox, Tronco no nível necessário não copiado no clipboard.
return ; reload
}
;~ APAGA ARQUIVO ANTES DE COMEÇAR
file2 := FileOpen(Endereco_Arquivo2, "w") ;
file2.Close()
NumeroOTS :=
["","","","","","","","","","","","","","","","","","","","","","","","","","","","
","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","","","","","","","","","","","","",""]
StatusOTS :=
["","","","","","","","","","","","","","","","","","","","","","","","","","","","
","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","","","","","","","","","","","","",""]
CentrosFuncionaisOTS :=
["","","","","","","","","","","","","","","","","","","","","","","","","","","","
","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","","","","","","","","","","","","",""]
Tronco_na_linha_GP :=
["","","","","","","","","","","","","","","","","","","","","","","","","","","","
","","","","","","","","","","","","","","","","","","","","","","","","","","","",
"","","","","","","","","","","","","","",""]
linha_GP =
buff_shGP =
sleep 200
achou = 0
contador = 0
while (!achou)
{
send, {Enter} ; 4}
achou := Full_Screen_Check("CONSULTA DE TRONCOS - FACILIDADES GERADAS")
if (contador == 14)
{
msgbox, problema ao achar o tronco no CFM.
Reload
}
contador ++
}
sleep 500 ; 2000
i=1
; pega tudo
file2 := FileOpen(Endereco_Arquivo2, "a") ; append
loop, 10
{
;~ msgbox, %i%
mouseclickdrag,left, 4, 284, 1274, 921
sleep 300
if clipboard not contains CENTRO(S) FUNCIONAL(IS)
{
if clipboard contains GP
{
file2.Write(clipboard "`r`n")
}
}
else
{
break
}
i++
send, {Enter}
sleep 300
}
file2.Close()
if (i==1)
{
msgbox, Nenhum nível GP reconhecido! %i%
reload
}
i=1
continuar = 1
while (continuar)
{
;~ msgbox, entrou
linha_GP =
buff_shGP =
numero_de_linhas_no_arquivo := i - 1
;~ i=1
;~ loop, %numero_de_linhas_no_arquivo%
;~ {
;~ msgbox, % Tronco_na_linha_GP[i]
;~ i++
;~ }
i=1
;~ msgbox, Lupará: %numero_de_linhas_no_arquivo%
;~ CONSULTA_TRONCO:
sleep 300
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
Send, {F12}
send, 2418
Send, {Enter}
Send, {F3}
send, 14
Send, {Enter}
send, 1
Send, {Enter}
loop, %numero_de_linhas_no_arquivo%
{
buffer_Tronco_na_linha_GP := Tronco_na_linha_GP[i]
buff_NumeroOTS =
buff_StatusOTS =
clipboard := buffer_Tronco_na_linha_GP
;~ msgbox, |%buffer_Tronco_na_linha_GP%|
if (buffer_Tronco_na_linha_GP != " ") ; "
") ; errando
{
;~ msgbox, entrou2
;~ sleep 3000
Full_Screen_Check("CONSULTA COMPLETA DE TRONCOS/CIRCUITOS")
;~ msgbox, % Tronco_na_linha_GP[i]
;~ sleep 500
send, % Tronco_na_linha_GP[i]
;~ sleep 500
send, {Enter}
sleep 1500
;~ -------------------
Full_Screen_Check("CONTA CORRENTE") ; CONSULTA DE TRONCOS
clipboard =
;~ sleep 1000
mouseclickdrag,left, 343, 355, 708, 359 ; 531, 358
sleep 200
NumeroOTS[i] := clipboard
;~ msgbox, % NumeroOTS[i]
sleep 200
clipboard =
mouseclickdrag,left, 341, 616, 898, 616
sleep 200
StatusOTS[i] := clipboard
sleep 200
Send, {F12}
sleep 200
}
i++
}
run D:\IBM_Parciais_Consulta_Pendencia_OTS.txt
}
return
;~ numberOfTests++
cliboardOLD := clipboard
textFound = 0
loop 4
{
sleep 200
mouseclickdrag, left, 4, 135, 1283, 951
sleep 300
if Clipboard contains %textNeeded%
{
textFound = 1
break
}
sleep 100
}
;~ if (textFound == 0)
;~ {
;~ if (numberOfScreens == numberOfTests)
;~ {
;~ msgbox, erro. Tela do CFM necessária não localizada!
;~ reload
;~ }
;~ }
clipboard := clipboardOLD
sleep 150
return %textFound%
}
;~ -----------------------------------
; ##############################################################################
num_solic =
wf =
cliente =
Servico =
velocidade =
designacao =
Tecnologia =
;~ uf =
cidade =
TipoLogr =
NomeLogr =
numero =
bairro =
cep =
contato_nome =
contato_tel =
global Title
pega_CLA(num_solic,wf,cliente,Servico,velocidade,designacao,Tecnologia,uf,cidade,Ti
poLogr,NomeLogr,numero,bairro,cep,contato_nome,contato_tel)
dir_executante = NE
coordenador_operadora2 = RAFAEL CARNEIRO NASCIMENTO ; REBECA LIMA
MACHADO
tipo_coord = EXECUTANTE
atividade = INSTALACAO
abordado = NAO
descricao = |SERVIÇO:%Servico%|DESIG.:%designacao%|TECNOLOGIA:
%Tecnologia%|PPC:|PVT:|
;~ TipoLogr
;~ NomeLogr
centro_manutencao = RCE
}
return
guiListboxProjeto()
{
Gui, Add, Text,, PROJETO:
Gui, Add, ListBox, vMyListBoxProjeto
gMyListBox_Projeto w640 r2
GuiControl,, MyListBoxProjeto,
PRODUÇÃO
GuiControl,, MyListBoxProjeto,
REDE ACESSO
}
return
MyListBox_Projeto:
if A_GuiEvent = Normal ; <> DoubleClick
{
GuiControlGet, MyListBoxProjeto
Escolha_Listbox_Projeto = %MyListBoxProjeto%
gui, destroy
if (Escolha_Listbox_Projeto == "PRODUÇÃO")
tipo_projeto = PRODUCAO
else if (Escolha_Listbox_Projeto == "REDE ACESSO")
tipo_projeto = REDE ACESSO
escreve_WF(num_solic,wf,tipo_projeto,dir_executante,coordenador_operadora2,cliente,
endereco,numero,bairro,cep,cidade,contato_nome,contato_tel,centro_manutencao,tipo_c
oord,servico,velocidade,atividade,Tecnologia,abordado,descricao)
}
return
}
return
WinMaximize, http://ntspo913/newcla/Asp/ConsultaGeralDet.asp
sleep 400
mouseclick, left, 220, 140
sleep 100
send, {WheelUp 5}
sleep 1000
num_solic =
wf =
cliente =
Servico =
velocidade =
designacao =
Tecnologia =
cidade =
TipoLogr =
NomeLogr =
numero =
bairro =
cep =
contato_nome =
contato_tel =
cep_len := strlen(cep)
StringMid, cep, cep, 2, %cep_len%
}
return
pegra_drag(x1,y1,x2,y2)
{
clipboard =
mouseclickdrag,left, %x1%, %y1%, %x2%, %y2%
sleep 50
send, ^c
sleep 100
return %clipboard%
}
escreve_WF(num_solic,wf,tipo_projeto,dir_executante,coordenador_operadora2,cliente,
endereco,numero,bairro,cep,cidade,contato_nome,contato_tel,centro_manutencao,tipo_c
oord,Servico,velocidade,atividade,Tecnologia,abordado,descricao)
{
;~ wingetactivetitle, Title
;~ if Title contains Cadastro
;~ {
;~ sleep 100
;~ }
;~ else
;~ {
;~ msgbox, você não está na tela correta.
;~ Reload
;~ }
sleep 300
mouseclick, left, 602, 275 ; 404, 260
send, %num_solic%
;~ sleep 300
send, {TAB}
sleep 3000
wingetactivetitle, Title
;~ msgbox, %Title%
if Title contains Atenção
{
send, ^{F4}
;~ winclose, %Title%
}
sleep 1000
send, %wf%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %tipo_projeto%
;~ sleep 300
send, {TAB}
sleep 3000
mouseclick, left, 617, 332 ; 404, 318
sleep 200
send, PADRAO
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %dir_executante%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %coordenador_operadora2%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %cliente%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %endereco%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %numero%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %bairro%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %cep%
;~ sleep 400
send, {TAB}
;~ sleep 300
send, %cidade%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %contato_nome%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %contato_tel%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %centro_manutencao%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %tipo_coord%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %Servico% ; xxxxxxxxxxxxxxxxxxxxxx
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %velocidade%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %atividade%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %Tecnologia% ; xxxxxxxxxxxxxxxxxxxxxx
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %abordado%
;~ sleep 300
send, {TAB}
;~ sleep 300
send, {TAB}
;~ sleep 300
send, %descricao%
INICIO3:
guiListboxFase() ; cabeçalho padrao gui contendo apenas a listbox
Gui, Show
return
MyListBox_fases:
if A_GuiEvent = Normal ; <> DoubleClick
{
GuiControlGet, MyListBox_fases
Escolha_Listbox = %MyListBox_fases%
gui, destroy
}
calcula_data(data_prevista,Escolha_Listbox)
clipboard := clipboard_antigo
return
}
return
guiListboxFase()
{
}
return
calcula_data(data_prevista,Escolha_Listbox)
{
data_futura =
Time =
FormatTime, dia_atual, %Time%, dd ; h
FormatTime, mes_atual, %Time%, MM ; h
FormatTime, ano_atual, %Time%, yyyy ; h
if (dia_data_prevista > 0)
if (dia_data_prevista < 32)
if (mes_data_prevista > 0)
if (mes_data_prevista < 13)
if (ano_data_prevista > 0)
if (ano_data_prevista < 9999)
{
if ((dia_atual + 30*mes_atual + 365*ano_atual) > (dia_data_prevista +
30*mes_data_prevista + 365*ano_data_prevista))
{
escrever = 1
}
;~ else
;~ {
;~ msgbox, %dia_atual%/%mes_atual%/%ano_atual% <
%dia_data_prevista%/%mes_data_prevista%/%ano_data_prevista%
;~ }
}
}
return
; FILTROS WFBR
------------------------------------------------------------------------
; filtros wfbr
#f::
{
inputbox, pesquisa_opcao,Opção,Escolha a opção de cliques:,,150,150
pesquisa(pesquisa_opcao)
clica(cProcurar)
}
return
pesquisa(opcao)
{
clica(cCM,"RCE")
if(opcao == 0)
{
clica(cStatus,"TODOS")
clica(cEmpresa,"TODAS") ; LIDER, IRTEL
clica(cTecnologia,"TODAS")
}
else if(opcao == 1)
{
clica(cStatus,"INTERROMPIDO")
clica(cEmpresa,"PROTELE") ; LIDER, IRTEL
clica(cTecnologia,"FIBRA EMBRATEL") ; FIBRA GPON
}
else if(opcao == 2)
{
clica(cStatus,"INTERROMPIDO")
clica(cEmpresa,"LIDER") ; LIDER, IRTEL
clica(cTecnologia,"FIBRA EMBRATEL") ; FIBRA GPON
}
else if(opcao == 3)
{
clica(cStatus,"INTERROMPIDO")
clica(cEmpresa,"IRTEL") ; LIDER, IRTEL
clica(cTecnologia,"FIBRA EMBRATEL") ; FIBRA GPON
}
else if(opcao == 4)
{
clica(cStatus,"INTERROMPIDO")
clica(cEmpresa,"PROTELE") ; LIDER, IRTEL
clica(cTecnologia,"FIBRA GPON")
}
else if(opcao == 5)
{
clica(cStatus,"INTERROMPIDO")
clica(cEmpresa,"LIDER") ; LIDER, IRTEL
clica(cTecnologia,"FIBRA GPON")
}
else if(opcao == 6)
{
clica(cStatus,"INTERROMPIDO")
clica(cEmpresa,"IRTEL") ; LIDER, IRTEL
clica(cTecnologia,"FIBRA GPON")
}
}
return
clica(opcao,escreve="",timming=100)
{
mouseclick,left,opcao.1,opcao.2
sleep, %timming%
if(escreve != "")
send, %escreve%
;~ sleep, %timming%
}
return
; ------------------------------------------------------------------------
;~ #IFWINNOTEXIST, ahk_class QWS3250X ; #iFWINNOTEXIST, ahk_exe qws3270x.exe
;~ #IFWINNOTEXIST, ahk_class QWS3250S ; ahk_exe qws3270s.exe
; /////////////////////
;~ AppsKey::
;~ {
;~ send, !{Tab}
;~ }
;~ return
;~ Rcontrol::
;~ {
;~ send, ^c
;~ }
;~ return
;~ RShift::
;~ {
;~ send, ^v
;~ }
;~ return
; /////////////////////
ins::
{
reload
}
return
#m::
{
mousegetpos, Mx, My
clipboard := Mx ", " My
msgbox, %clipboard%
}
return
#n::
{
mousegetpos, Nx, Ny
clipboard := Mx ", " My ", " Nx ", " Ny
msgbox, %clipboard%
}
return