Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance, Force
- SetWorkingDir, %A_ScriptDir%
- Sendmode InPut
- #Persistent
- #NoEnv
- #HotKeyInterval 1
- #MaxHotkeysPerInterval 127
- #InstallKeybdHook
- #UseHook
- #SingleInstance, Force
- SetControlDelay, -1
- SetMouseDelay, -1
- SetWinDelay,-1
- SetBatchLines,-1
- SleepTime := 700
- msgbox, F1 FORNECEDORES | F2 PROPRIETARIO | F3 FROTA | F4 MOTORISTA
- *F1::
- UF := "SP"
- Loop,
- {
- send, ^{c}
- clipwait
- sleep, 100
- if (ClipBoard = "`r`n")
- {
- loop, 5
- {
- SoundBeep, 2000, 350, 1000
- }
- break
- }
- TipoDePessoa := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- CPFouCNPJ := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- IE := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- NumeroBanco := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Banco := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Favorecido := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- TipoDaChave := RegExReplace( ClipBoard, "[\r\n\t]" )
- sleep, 150
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- ChavePix := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- NumAgencia := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- NumConta := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 100
- send, {right}
- sleep, 50
- gosub, ColarNoDDS
- sleep, 250
- TipoDePessoa := "`r`n"
- CPFouCNPJ := "`r`n"
- IE := "`r`n"
- NumeroBanco := "`r`n"
- Banco := "`r`n"
- Favorecido := "`r`n"
- TipoDaChave := "`r`n"
- ChavePix := "`r`n"
- NumAgencia := "`r`n"
- NumConta := "`r`n"
- sleep, 150
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 150
- send, {down}
- sleep, 100
- loop, 8
- {
- send, ^{left}
- sleep, 50
- }
- sleep, 250
- }
- Return
- *F2::
- loop
- {
- Gosub, CopiaDados
- sleep, 500
- if (Parar = 1)
- {
- break
- }
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- sleep, 250
- send, {click, 572, 498} ;;aba dados pessoais
- sleep, 500
- send, {click, 529, 240}
- sleep, 200
- Send, {Click, 677, 307} ; nome proprietário digitável
- Sleep, %SleepTime%
- send, %NomePropri%
- Send, {Click, 606, 355, 2} ; CPF/CNPJ digitável
- Sleep, %SleepTime%
- send, %Cpf_Cnpj%
- Sleep, %SleepTime%
- Send, {Click, 839, 361} ; Data de nascimento digitável
- Sleep, %SleepTime%
- Send, %Data%
- Sleep, %SleepTime%
- Send, {Click, 982, 358} ; RG digitável
- Sleep, %SleepTime%
- send, %RG%
- Sleep, %SleepTime%
- Send, {Click, 1149, 359} ; Inscrição estadual digitável SEMPRE ISENTO
- Sleep, %SleepTime%
- send, isento
- Sleep, %SleepTime%
- Send, {Click, 570, 407} ; ANTT digitável
- Sleep, %SleepTime%
- send, %ANTT%
- Sleep, %SleepTime%
- Send, {Click, 629, 466} ; Tipo de proprietário droplist
- Sleep, %SleepTime%
- Loop, Parse, TipoPropri, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 500
- Send, {Click, 731, 564} ; Endereço digitável
- Sleep, %SleepTime%
- send, %Endereço%
- Sleep, %SleepTime%
- Send, {Click, 991, 568} ; Bairro digitável
- Sleep, %SleepTime%
- send, %Bairro%
- Sleep, %SleepTime%
- send, {click, 560, 610} ; CEP
- Sleep, %SleepTime%
- send, %CEP%
- Sleep, %SleepTime%
- Send, {Click, 971, 614} ; UF droplist
- Sleep, %SleepTime%
- Loop, Parse, UF, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 200
- Send, {Click, 569, 665} ; Telefone digitável
- Sleep, %SleepTime%
- send, %Telefone%
- Sleep, %SleepTime%
- send, {click, 795, 657} ; Telefone digitável
- Sleep, %SleepTime%
- send, %Telefone%
- Sleep, %SleepTime%
- send, {click, 577, 707}
- Sleep, %SleepTime%
- send, %Email%
- Sleep, %SleepTime%
- Send, {click, 696, 506} ; aba dados bancários
- Sleep, %SleepTime%
- send, {click, 609, 580} ; codigo banco
- Sleep, %SleepTime%
- Loop, Parse, CodBanco, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- loop, 5
- {
- send, {tab}
- sleep, 50
- }
- Sleep, %SleepTime%
- send, {click, 850, 575} ; agencia banco
- Sleep, %SleepTime%
- send, %Banco%
- sleep, %SleepTime%
- send, {click, 933, 577} ; codigo conta
- Sleep, %SleepTime%
- send, %NumConta%
- Sleep, %SleepTime%
- send, {click, 1342, 565} ; botao de favorecido puxado do cadastro de fornecedores
- Sleep, %SleepTime%
- send, {click, 652, 683} ; chave pix digitavel
- Sleep, %SleepTime%
- send, %ChavePix%
- Sleep, %SleepTime%
- if (TipoDaChave = 0)
- {
- Gosub, ChaveTipo1
- sleep, 100
- }
- else if (TipoDaChave = 1)
- {
- Gosub, ChaveTipo2
- sleep, 100
- }
- else if (TipoDaChave = 2)
- {
- Gosub, ChaveTipo3
- sleep, 100
- }
- else if (TipoDaChave = 3)
- {
- Gosub, ChaveTipo4
- sleep, 100
- }
- sleep, %SleepTime%
- if (TipoConta = 0)
- {
- Gosub, TipoConta1
- sleep, 100
- }
- else if (TipoConta = 1)
- {
- Gosub, TipoConta2
- sleep, 100
- }
- sleep, %SleepTime%
- send, {click, 563, 243}
- Sleep, 1200
- send, {space}
- sleep, 500
- send, {space}
- sleep, 500
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 250
- clipboard := "`r`n"
- sleep, 100
- send, ^{left}
- sleep, 50
- send, ^{left}
- sleep, 50
- send, ^{left}
- sleep, 50
- send, {down}
- }
- Return
- *F3::
- loop
- {
- Gosub, CopiaDadosVeiculo
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- sleep, 250
- If (Parar = 1)
- Break
- send, {click, 534, 291}
- sleep, 500
- SEND, {CLICK, 693, 355} ; PLACA
- Sleep, %SleepTime%
- send, %Placa%
- Sleep, %SleepTime%
- SEND, {CLICK, 972, 360} ; UF DROPLIST
- Sleep, %SleepTime%
- Loop, Parse, UF, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 200
- SEND, {CLICK, 778, 410} ; PROPRIETÁRIO DROPLIST
- Sleep, %SleepTime%
- Loop, Parse, Proprietario, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 200
- LOOP, 5
- {
- SEND, {TAB}
- SLEEP, 50
- }
- Sleep, %SleepTime%
- SEND, {CLICK, 932, 407} ; DISPONIVEL SEMPRE < DROPLIST
- Sleep, %SleepTime%
- send, {d}
- sleep, 200
- send, {esc}
- LOOP, 5
- {
- SEND, {TAB}
- SLEEP, 50
- }
- Sleep, %SleepTime%
- SEND, {CLICK, 634, 519} ; MARCA DO VEICULO < DROPLIST
- Sleep, %SleepTime%
- Loop, Parse, Marca, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 200
- LOOP, 5
- {
- SEND, {TAB}
- SLEEP, 50
- }
- Sleep, %SleepTime%
- SEND, {CLICK, 934, 517} ; MODELO VEICULO < DROPLIST
- Sleep, %SleepTime%
- Loop, Parse, Modelo, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 200
- LOOP, 5
- {
- SEND, {TAB}
- SLEEP, 50
- }
- Sleep, %SleepTime%
- SEND, {CLICK, 1187, 517} ; ANO FABRICATIONS < DROPLIST
- Sleep, %SleepTime%
- Loop, Parse, AnoFab, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 200
- SEND, {CLICK, 1341, 516} ; ANO MODELO < DROPLIST
- Sleep, %SleepTime%
- Loop, Parse, AnoMod, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 200
- SEND, {CLICK, 657, 568} ; tipo rodado < DROPLIST
- Sleep, %SleepTime%
- Loop, Parse, TipoRodado, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 200
- LOOP, 5
- {
- SEND, {TAB}
- SLEEP, 50
- }
- Sleep, %SleepTime%
- SEND, {CLICK, 960, 568} ; tipo veículo (reboque tracao)< DROPLIST
- Sleep, %SleepTime%
- Loop, Parse, Reboque_Tracao, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 200
- SEND, {CLICK, 730, 619} ; tipo carroceria (opções no txt) < DROPLIST
- Sleep, %SleepTime%
- Loop, Parse, TipoCarroceria, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 200
- SEND, {CLICK, 596, 664} ; tara
- Sleep, %SleepTime%
- send, %Tara%
- Sleep, %SleepTime%
- SEND, {CLICK, 1184, 666} ;CAPACIDADE DA CARGA POR METRO CUBICO (M³)
- Sleep, %SleepTime%
- send, %CapacidadeCarga%
- sleep, 500
- send, {click, 610, 713} ;CHASSI
- Sleep, %SleepTime%
- SEND, %Chassi%
- Sleep, %SleepTime%
- send, {click, 1059, 716}
- Sleep, %SleepTime%
- SEND, %Renavam%
- Sleep, 300
- send, {click, 1114, 353}
- sleep, 300
- send, {click, 594, 289}
- sleep, 800
- send, {space}
- sleep, 500
- send, {space}
- sleep, 100
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 250
- clipboard := "`r`n"
- sleep, 100
- send, ^{left}
- sleep, 50
- send, ^{left}
- sleep, 50
- send, ^{left}
- sleep, 50
- send, {down}
- sleep, 100
- }
- Return
- TipoConta1:
- send, {Click, 1070, 561} ;;Corrente
- Return
- TipoConta2:
- send, {Click, 1165, 564} ;;poupança
- Return
- ChaveTipo1:
- send, {click, 1080, 682};; celular
- Return
- ChaveTipo2:
- send, {click, 1258, 682};; cpf ou cnpj
- return
- ChaveTipo3:
- send, {click, 1080, 716};; chave aleatoria
- return
- ChaveTipo4:
- send, {click, 1258, 716};; email
- return
- CopiaDadosVeiculo:
- Clipboard := "`r`n"
- sleep, 200
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 150
- send, ^{c}
- clipwait
- sleep, 100
- if (clipboard = "`r`n")
- {
- Parar := 1
- }
- sleep, 150
- Placa := RegExReplace( ClipBoard, "[\r\n\t]" )
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- UF := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Proprietario := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Marca := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Modelo := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- AnoFab := RegExReplace( ClipBoard, "[\r\n\t]" )
- sleep, 150
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- AnoMod := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- TipoRodado := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Reboque_Tracao := clipboard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- TipoCarroceria := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Tara := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- CapacidadeCarga := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Chassi := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Renavam := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- return
- *F4::
- loop
- {
- Gosub, CopiaDados_Motorista
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- If (Parar = 1)
- Break
- sleep, 100
- send, {click, 458, 240}
- sleep, 200
- send, {click, 499, 436} ;;Aba dados pessoais
- sleep, 100
- send, {click, 637, 312} ;;Nome
- Sleep, %SleepTime%
- send, %Nome_Moto%
- Sleep, %SleepTime%
- send, {click, 756, 352} ;;Empresa filial origem
- Sleep, %SleepTime%
- send, {a}
- sleep, 100
- send, {esc}
- sleep, 250
- send, {click, 732, 403} ;;Departamento função
- Sleep, %SleepTime%
- loop, 15
- {
- send, {down}
- sleep, 50
- }
- send, {esc}
- Sleep, %SleepTime%
- send, {click, 520, 503} ;;Data_Nasci
- Sleep, %SleepTime%
- send, %Data_Nasci%
- Sleep, %SleepTime%
- send, {click, 645, 506} ;;CPF
- Sleep, %SleepTime%
- send, %CPF%
- Sleep, %SleepTime%
- send, {click, 807, 504} ;;RG
- Sleep, %SleepTime%
- send, %RG%
- Sleep, %SleepTime%
- send, {click, 533, 740} ;;Endereço
- Sleep, %SleepTime%
- send, %Endereco%
- Sleep, %SleepTime%
- send, {click, 1062, 741} ;;Bairro
- Sleep, %SleepTime%
- send, %Bairro%
- Sleep, %SleepTime%
- send, {click, 598, 789} ;;Cidade
- Sleep, %SleepTime%
- send, %Cidade%
- Sleep, %SleepTime%
- send, {click, 895, 787} ;;UF
- Sleep, %SleepTime%
- Loop, Parse, UF, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 250
- send, {click, 634, 437} ;;dados espec
- Sleep, %SleepTime%
- send, {click, 563, 493} ;;CNH
- Sleep, %SleepTime%
- send, %CNH%
- Sleep, %SleepTime%
- send, {click, 527, 543} ;;Placa
- Sleep, %SleepTime%
- Loop, Parse, Placa_Moto, `/
- {
- Send, % A_LoopField
- Sleep, 1000
- }
- send, {esc}
- sleep, 250
- send, {click, 488, 244}
- sleep, 250
- loop, 3
- {
- send, {enter}
- sleep, 500
- }
- return
- CopiaDados_Motorista:
- Clipboard := "`r`n"
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- if (clipboard = "`r`n")
- {
- Parar := 1
- }
- sleep, 150
- Nome_Moto := RegExReplace( ClipBoard, "[\r\n\t]" )
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Data_Nasci := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- CPF := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- RG := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Endereco := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Bairro := RegExReplace( ClipBoard, "[\r\n\t]" )
- sleep, 150
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Cidade := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- UF := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- CNH := clipboard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Placa_Moto := clipboard
- sleep, 50
- ClipBoard := "`r`n"
- }
- return
- CopiaDados:
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- if (clipboard = "`r`n")
- {
- Parar := 1
- }
- sleep, 150
- NomePropri := RegExReplace( ClipBoard, "[\r\n\t]" )
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Cpf_Cnpj := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Data := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- RG := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- ANTT := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- TipoPropri := RegExReplace( ClipBoard, "[\r\n\t]" )
- sleep, 150
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Endereço := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Bairro := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- CEP := clipboard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- UF := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Telefone := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- CodBanco := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Banco := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- NumConta := RegExReplace( ClipBoard, "[\r\n\t]" )
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- ChavePix := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 50
- send, ^{c}
- clipwait
- sleep, 100
- TipoDaChave := RegExReplace( ClipBoard, "[\r\n\t]" )
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- TipoConta := RegExReplace( ClipBoard, "[\r\n\t]" )
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 100
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep, 100
- Email := clipboard
- sleep, 150
- return
- ColarNoDDS:
- {
- DadoDivergente := 0
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- sleep, 150
- send, {click, 365, 143}
- sleep, 200
- send, {click, 397, 321}
- sleep, 100
- send, {click, 485, 206}
- sleep, 80
- send, %Favorecido%
- sleep, 100
- send, {click, 788, 203, 2}
- sleep, 50
- send, {n}
- sleep, 50
- send, {esc}
- sleep, 50
- send, {click, 415, 245}
- sleep, 150
- send, %CPFouCNPJ%
- sleep, 1000
- send, {click, 431, 372}
- sleep, 150
- send, %Favorecido%
- sleep, 500
- send, {click, 573, 246}
- sleep, 150
- send, ISENTO
- IfWinNotExist, ahk_exe DDSLogistica.exe
- {
- Msgbox, DDS Fatal error (SQL)
- Reload
- }
- sleep, 1000
- send, {click, 732, 451, 2}
- sleep, 150
- Loop, Parse, UF, `/
- {
- Send, % A_LoopField
- Sleep, 400
- }
- sleep, 400
- send, {esc}
- sleep, 50
- send, {click, 650, 320}
- sleep, 250
- IfWinNotExist, ahk_exe DDSLogistica.exe
- {
- Msgbox, DDS Fatal error (SQL)
- Reload
- }
- loop
- {
- CoordMode, Pixel, Relative
- PixelSearch, X, Y, 398, 548, 441, 558, 0x6B86BC, 10, Fast RGB
- if errorlevel = 0
- break
- }
- sleep, 100
- send, {click, 463, 469}
- sleep, 100
- Loop, Parse, NumeroBanco, `/
- {
- Send, % A_LoopField
- Sleep, 250
- }
- sleep, 100
- send, {Esc}
- sleep, 100
- send, {click, 689, 474}
- sleep, 100
- send, %NumAgencia%
- sleep, 100
- send, {click, 810, 473}
- sleep, 100
- send, %NumConta%
- sleep, 100
- send, {click, 600, 518}
- sleep, 80
- send, %Favorecido%
- sleep, 100
- send, {click, 831, 512}
- sleep, 80
- send, %CPFouCNPJ%
- sleep, 100
- if (TipoDaChave = 0)
- {
- send, {click, 387, 552}
- }
- else if (TipoDaChave = 1)
- {
- Gosub, TipoChave1
- }
- else if (TipoDaChave = 2)
- {
- Gosub, TipoChave2
- }
- else if TipoDaChave = 3
- {
- Gosub, TipoChave3
- }
- sleep, 1000
- send, {click, 622, 560}
- sleep, 80
- send, %ChavePix%
- sleep, 100
- send, {click, 907, 469}
- sleep, 100
- send, {click, 436, 150}
- sleep, 1000
- loop
- {
- CoordMode, Pixel, Relative
- PixelSearch, X, Y, 28, 55, 60, 84, 0x108DDC, 2, Fast RGB
- if errorlevel = 0
- {
- sleep, 100
- send, {space}
- sleep, 1000
- break
- }
- else if errorlevel = 1
- {
- CoordMode, Pixel, Relative
- PixelSearch, X, Y, 26, 57, 62, 89, 0xFEC700, 2, Fast RGB
- if errorlevel = 0
- {
- sleep, 100
- gosub, Dado_Divergente
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- sleep, 150
- send, {space}
- sleep, 150
- DadoDivergente := 1
- break
- }
- }
- }
- if (DadoDivergente = 0)
- sleep, 2000
- loop
- {
- CoordMode, Pixel, Relative
- PixelSearch, X, Y, 28, 55, 60, 84, 0xDE480C, 2, Fast RGB
- if errorlevel = 0
- {
- sleep, 100
- gosub, Fornecedor_cadastrado_anteriormente
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- sleep, 150
- send, {space}
- sleep, 150
- break
- }
- else if errorlevel = 1
- {
- CoordMode, Pixel, Relative
- PixelSearch, X, Y, 28, 55, 60, 84, 0x108DDC, 2, Fast RGB
- if errorlevel = 0
- sleep, 100
- send, {space}
- sleep, 200
- break
- }
- }
- send, {click, 365, 143}
- sleep, 500
- }
- Return
- Fornecedor_cadastrado_anteriormente:
- {
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 150
- send, Fornecedor já cadastrado ou dados repetidos
- sleep, 250
- }
- return
- Dado_Divergente:
- {
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 150
- send, Dado divergente (provavelmente o CPF/CNPJ)
- }
- return
- TipoChave1:
- Send, {click, 386, 575}
- return
- TipoChave2:
- Send, {click, 389, 591}
- return
- TipoChave3:
- Send, {click, 388, 615}
- return
- ProcessExist(name)
- {
- Process, Exist, %name%
- return Errorlevel
- }
- return
- *F6::
- ExitApp
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement