Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Persistent
- #NoEnv
- #HotKeyInterval 1
- #MaxHotkeysPerInterval 127
- #InstallKeybdHook
- #UseHook
- #SingleInstance, Force
- SetControlDelay, -1
- SetMouseDelay, -1
- SetWinDelay, -1
- SetBatchLines, -1
- Gui, ProgramGui: Font, s10 bolda Verdana cYellow
- Gui, ProgramGui: Color, Black
- Gui, ProgramGui: Add, text, cYellow , F1 inicia, F6 pausa
- Gui, ProgramGui: Add, text, cYellow , Selecione o sentido
- Gui, ProgramGui: Add, DropDownList, vList1, Cima|Baixo
- Gui, ProgramGui: Show,, Alterar Faixa
- Return
- *F1::
- Gui, ProgramGui: Submit, NoHide
- if (List1 = "Cima")
- UporDown := "Up"
- else if (List1 = "Baixo")
- UporDown := "Down"
- loop
- {
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 200
- send, ^{c}
- ClipWait
- sleep, 50
- If (Clipboard = "`r`n")
- {
- SoundBeep, 1000, 350, 100
- SoundBeep, 1000, 350, 100
- SoundBeep, 1000, 350, 100
- SoundBeep, 1000, 350, 100
- SoundBeep, 1000, 350, 100
- SoundBeep, 1000, 350, 100
- SoundBeep, 1000, 350, 100
- Break
- }
- IdRota := ClipBoard
- sleep, 100
- ClipBoard := "`r`n"
- sleep 100
- send, {right}
- sleep, 100
- send, ^{c}
- clipwait
- sleep 50
- TipoRodado := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 250
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- loop
- {
- CoordMode, Pixel, Relative
- PixelSearch, X, Y, 1039, 224, 1110, 240, 0x6782B6, 20, Fast RGB
- if (errorlevel = 1)
- {
- ControlClick, x511 y191, %Title%,, Left, 2, NA
- }
- else if (errorlevel = 0)
- {
- break
- }
- }
- sleep, 200
- send, {Click, 864, 311, 2} ;;caixa de pesquisa numero da rota
- sleep, 90
- send, %IdRota%
- sleep, 150
- send, {Click, 1526, 409} ;;pesquisar
- sleep, 250
- send, {click, 347, 521} ;;exibir
- ClipBoard := "`r`n"
- loop
- {
- CoordMode, Pixel, Relative
- PixelSearch, X, Y, 357, 208, 388, 239, 0xD23D26, 20, Fast RGB
- if errorlevel = 0
- break
- }
- sleep, 500
- send, {click, 1519, 305, 2}
- sleep, 250
- Loop, Parse, TipoRodado, `/
- {
- Send, % A_LoopField
- Sleep, 250
- }
- sleep, 400
- send, {esc}
- sleep, 500
- send, {click, 407, 532, 2}
- sleep, 500
- Gosub, Deleta
- sleep, 500
- send, {click, 702, 532, 2}
- sleep, 500
- Gosub, Deleta
- sleep, 500
- send, {click, 1116, 532, 2}
- sleep, 500
- Gosub, Deleta
- sleep, 500
- send, {click, 1383, 532, 2}
- sleep, 500
- Gosub, Deleta
- sleep, 500
- send, {click, 932, 520, 2}
- sleep, 450
- send, {click, 1607, 520, 2}
- sleep, 450
- send, {click, 339, 221} ;;salvar
- sleep, 500
- Loop
- {
- IfWinExist, ahk_class #32770
- {
- Send, {space}
- sleep, 500
- break
- }
- }
- Loop
- {
- IfWinExist, ahk_class #32770
- {
- Send, {space}
- sleep, 500
- break
- }
- }
- sleep, 350
- Send, {Enter}
- sleep, 650
- send, {click, 511, 191, 2} ;;aba de pesquisa
- sleep, 500
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 100
- Clipboard = "`r`n"
- sleep, 150
- send, {%UporDown%}
- sleep, 80
- send, {left}
- sleep, 80
- IdRota := "`r`n"
- TipoRodado := "`r`n"
- sleep, 100
- }
- Return
- Deleta:
- {
- send, {del}
- sleep, 300
- send, {Down}
- sleep, 50
- send, {down}
- }
- return
- *F5::
- Reload
- Return
- *F6::
- Pause
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement