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, 100
- send, ^{c}
- ClipWait
- sleep, 100
- 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, 50
- send, {right}
- sleep, 50
- send, ^{c}
- ClipWait
- sleep, 50
- ValKm := ClipBoard
- sleep, 50
- ClipBoard := "`r`n"
- sleep, 150
- 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, 50
- 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, 350
- send, {click, 1139, 590 , 2}
- sleep, 80
- send, %ValKm%
- sleep, 100
- send, {click, 932, 520, 2}
- sleep, 450
- ControlClick, x347 y224, %Title%,, Left, 1, NA
- sleep, 1000
- 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"
- send, {Left}
- sleep, 50
- send, {%UporDown%}
- ValKm := "`r`n"
- IdRota := "`r`n"
- sleep, 200
- }
- Return
- *F5::
- Reload
- Return
- *F6::
- Pause
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement