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, Checkbox, vMyCheckBox1, Credito
- Gui, ProgramGui: add, Checkbox, vMyCheckBox2, Debito
- Gui, ProgramGui: add, text, cYellow , Selecone a data
- Gui, ProgramGui: add, MonthCal, gCalendar vMyCalendar
- Gui, ProgramGui: show,, Avulso
- Return
- Calendar:
- Gui, ProgramGui: Submit, NoHide
- FormatTime, mycalendar, %mycalendar%, dd/MM/yyyy
- Data := mycalendar
- Return
- *F1::
- Gui, ProgramGui: Submit, NoHide
- GuiControlGet, MyCheckBox1
- GuiControlGet, MyCheckBox2
- sleep, 20
- If (MyCheckBox1 = 1)&&(MyCheckBox2 = 1)
- {
- Msgbox, marca apenas uma caixinha pra n dar pau karai
- reload
- }
- If (MyCheckBox1 = 1)
- {
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- sleep, 150
- WinGet, DDSPid, PID, A
- sleep, 250
- GoSub, CreditoOn
- }
- else if (MyCheckBox2 = 1)
- {
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- sleep, 150
- WinGet, DDSPid, PID, A
- sleep, 250
- GoSub, DebitoOn
- }
- else
- msgbox, Selecione debito ou credito
- return
- *F2::
- Gui, ProgramGui: Submit, NoHide
- GuiControlGet, MyCheckBox1
- GuiControlGet, MyCheckBox2
- sleep, 20
- If (MyCheckBox1 = 1)&&(MyCheckBox2 = 1)
- {
- Msgbox, marca apenas uma caixinha pra n dar pau karai
- reload
- }
- If (MyCheckBox1 = 1)
- {
- GoSub, CreditoOnData
- }
- else if (MyCheckBox2 = 1)
- {
- GoSub, DebitoOn
- }
- else
- msgbox, Selecione debito ou credito
- return
- CreditoOnData:
- loop
- {
- ClipBoard :="`r`n"
- sleep, 150
- send, ^{c}
- ClipWait
- sleep, 100
- Projeto := ClipBoard
- sleep, 100
- if (Projeto ="`r`n")
- {
- sleep, 80
- SoundBeep, 1000, 350, 100
- Break
- }
- sleep, 100
- ClipBoard := "`r`n"
- send, {right}
- sleep, 100
- Send, ^{c}
- ClipWait
- sleep, 100
- NomeMotorista := ClipBoard
- ClipBoard := "`r`n"
- sleep, 100
- send, {Right}
- sleep, 100
- Send, ^{c}
- ClipWait
- sleep, 100
- DataCopiada := ClipBoard
- ClipBoard := "`r`n"
- sleep, 100
- send, {Right}
- sleep, 100
- Send, ^{c}
- ClipWait
- sleep, 100
- ValorBonus := ClipBoard
- sleep, 100
- ClipBoard := "`r`n"
- send, {right}
- sleep, 100
- send, ^{c}
- ClipWait
- sleep, 100
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- sleep, 250
- loop
- {
- CoordMode, Pixel, Relative
- PixelSearch, X, Y, 456, 301, 486, 334, 0xE27869 , 10, Fast RGB
- if errorlevel = 0
- break
- }
- sleep, 450
- send, {Click, 452, 441} ;;codigo minuta
- sleep, 50
- Send, 3
- sleep, 75
- send, {click, 590, 437} ;;origem
- sleep, 70
- send, {a}
- sleep, 50
- send, {Enter}
- sleep, 70
- send, {click, 887, 436, 2} ;;historico
- sleep, 100
- send, {click, 887, 436, 2}
- sleep, 150
- send, ^{v}
- sleep, 200
- send, {click, 603, 381}
- sleep, 50
- send, %DataCopiada%
- sleep, 50
- send, {click, 765, 382, 2} ;;nome motorista
- sleep, 150
- Loop, Parse, NomeMotorista
- {
- Send, % A_LoopField
- Sleep, 150
- }
- send, {esc}
- sleep, 150
- send, {click, 1170, 378, 2} ;;projeto
- sleep, 70
- Loop, Parse, Projeto
- {
- Send, % A_LoopField
- Sleep, 70
- }
- send, {esc}
- sleep, 200
- send, {click, 1460, 378, 2}
- sleep, 150
- send, {c} ;;crédito ou débito
- sleep, 150
- send, {click, 1312, 381, 2} ;;valor
- sleep, 80
- send, ^{a}
- sleep, 200
- send, %ValorBonus%
- sleep, 150
- send, {click, 445, 321}
- sleep, 400
- send, {Enter}
- sleep, 80
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 100
- send, {Left}
- sleep, 50
- send, {Left}
- sleep, 50
- send, {Left}
- sleep, 50
- send, {Left}
- sleep, 50
- send, {down}
- sleep, 50
- }
- return
- CreditoOn:
- loop
- {
- sleep, 100
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 500
- ClipBoard :="`r`n"
- sleep, 250
- send, ^{c}
- ClipWait
- sleep, 250
- IfWinExist, ahk_class #32770
- {
- send, {space}
- sleep, 200
- send, ^{c}
- clipwait
- }
- Projeto := ClipBoard
- sleep, 30
- if (Projeto ="`r`n")
- {
- sleep, 80
- SoundBeep, 1000, 350, 100
- Break
- }
- sleep, 250
- ClipBoard := "`r`n"
- send, {right}
- sleep, 100
- Send, ^{c}
- ClipWait
- sleep, 250
- IfWinExist, ahk_class #32770
- {
- send, {space}
- sleep, 200
- send, ^{c}
- clipwait
- }
- NomeMotorista := ClipBoard
- ClipBoard := "`r`n"
- sleep, 100
- send, {Right}
- sleep, 100
- Send, ^{c}
- ClipWait
- sleep, 250
- IfWinExist, ahk_class #32770
- {
- send, {space}
- sleep, 200
- send, ^{c}
- clipwait
- }
- ValorBonus := ClipBoard
- sleep, 100
- ClipBoard := "`r`n"
- send, {right}
- sleep, 100
- send, ^{c}
- ClipWait
- sleep, 250
- IfWinExist, ahk_class #32770
- {
- send, {space}
- sleep, 200
- send, ^{c}
- clipwait
- }
- sleep, 500
- WinActivate, ahk_exe DDSLogistica.exe
- WinActivate, ahk_exe DDSLogistica.exe
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- sleep, 250
- loop
- {
- CoordMode, Pixel, Relative
- PixelSearch, X, Y, 456, 301, 486, 334, 0xE27869 , 10, Fast RGB
- if errorlevel = 0
- break
- }
- send, {click, 413, 319}
- sleep, 450
- send, {Click, 452, 441} ;;codigo minuta
- sleep, 50
- Send, 3
- sleep, 75
- send, {click, 590, 437} ;;origem
- sleep, 70
- send, {a}
- sleep, 50
- send, {Enter}
- sleep, 200
- send, {click, 887, 436, 2} ;;historico
- sleep, 250
- send, ^{v}
- sleep, 200
- send, {click, 603, 381}
- sleep, 50
- send, %Data%
- sleep, 50
- send, {click, 765, 382, 2} ;;nome motorista
- sleep, 150
- Loop, Parse, NomeMotorista
- {
- Send, % A_LoopField
- Sleep, 150
- }
- send, {esc}
- sleep, 150
- send, {click, 1170, 378, 2} ;;projeto
- sleep, 70
- Loop, Parse, Projeto
- {
- Send, % A_LoopField
- Sleep, 150
- }
- send, {esc}
- sleep, 200
- send, {click, 1460, 378, 2}
- sleep, 150
- send, {c} ;;crédito ou débito
- sleep, 150
- send, {click, 1312, 381, 2} ;;valor
- sleep, 80
- send, ^{a}
- sleep, 200
- send, %ValorBonus%
- sleep, 150
- send, {click, 445, 321}
- sleep, 400
- send, {Enter}
- sleep, 3000
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 1000
- send, {Left}
- sleep, 50
- send, {Left}
- sleep, 50
- send, {Left}
- sleep, 50
- send, {Left}
- sleep, 50
- send, {down}
- sleep, 500
- }
- return
- DebitoOn:
- loop
- {
- sleep, 100
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 500
- ClipBoard :="`r`n"
- sleep, 250
- send, ^{c}
- ClipWait
- sleep, 100
- IfWinExist, ahk_class #32770
- {
- send, {space}
- sleep, 200
- send, ^{c}
- clipwait
- }
- Projeto := ClipBoard
- sleep, 30
- if (Projeto ="`r`n")
- {
- sleep, 80
- SoundBeep, 1000, 350, 100
- Break
- }
- sleep, 100
- ClipBoard := "`r`n"
- send, {right}
- sleep, 100
- Send, ^{c}
- ClipWait
- sleep, 100
- IfWinExist, ahk_class #32770
- {
- send, {space}
- sleep, 200
- send, ^{c}
- clipwait
- }
- NomeMotorista := ClipBoard
- ClipBoard := "`r`n"
- sleep, 100
- send, {Right}
- sleep, 100
- Send, ^{c}
- ClipWait
- sleep, 100
- IfWinExist, ahk_class #32770
- {
- send, {space}
- sleep, 200
- send, ^{c}
- clipwait
- }
- ValorBonus := ClipBoard
- sleep, 100
- ClipBoard := "`r`n"
- send, {right}
- sleep, 100
- send, ^{c}
- ClipWait
- sleep, 100
- IfWinExist, ahk_class #32770
- {
- send, {space}
- sleep, 200
- send, ^{c}
- clipwait
- }
- sleep, 500
- WinActivate, ahk_pid %DDSPid%
- WinWaitActive, ahk_pid %DDSPid%
- sleep, 250
- loop
- {
- CoordMode, Pixel, Relative
- PixelSearch, X, Y, 456, 301, 486, 334, 0xE27869 , 10, Fast RGB
- if errorlevel = 0
- break
- }
- send, {click, 413, 319}
- sleep, 450
- send, {Click, 452, 441} ;;codigo minuta
- sleep, 50
- Send, 3
- sleep, 75
- send, {click, 590, 437} ;;origem
- sleep, 70
- send, {a}
- sleep, 50
- send, {Enter}
- sleep, 200
- send, {click, 887, 436, 2} ;;historico
- sleep, 250
- send, ^{v}
- sleep, 200
- send, {click, 603, 381}
- sleep, 50
- send, %Data%
- sleep, 50
- send, {click, 765, 382, 2} ;;nome motorista
- sleep, 150
- Loop, Parse, NomeMotorista
- {
- Send, % A_LoopField
- Sleep, 150
- }
- send, {esc}
- sleep, 150
- send, {click, 1170, 378, 2} ;;projeto
- sleep, 70
- Loop, Parse, Projeto
- {
- Send, % A_LoopField
- Sleep, 150
- }
- send, {esc}
- sleep, 200
- send, {click, 1460, 378, 2}
- sleep, 150
- send, {d} ;;crédito ou débito
- sleep, 150
- send, {click, 1312, 381, 2} ;;valor
- sleep, 80
- send, ^{a}
- sleep, 200
- send, %ValorBonus%
- sleep, 150
- send, {click, 445, 321}
- sleep, 400
- send, {Enter}
- sleep, 3000
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 1000
- send, {Left}
- sleep, 50
- send, {Left}
- sleep, 50
- send, {Left}
- sleep, 50
- send, {Left}
- sleep, 50
- send, {down}
- sleep, 500
- }
- return
- VerificaErro:
- {
- WinActivate, ahk_exe DDSLogistica.exe
- WinWaitActive, ahk_exe DDSLogistica.exe
- sleep, 400
- loop, 50
- {
- CoordMode, Pixel, Relative
- PixelSearch, X, Y, 30, 58, 75, 103, 0xE14E10, 20, Fast RGB
- if errorlevel = 0
- {
- send, {space}
- sleep, 150
- send, {click, 415, 316}
- sleep, 250
- WinActivate, ahk_exe EXCEL.exe
- WinWaitActive, ahk_exe EXCEL.exe
- sleep, 150
- send, {left}
- sleep, 50
- send, {left}
- sleep, 50
- send, {left}
- sleep, 50
- send, {up}
- sleep, 50
- break
- }
- }
- }
- return
- *^F4::
- loop
- {
- send, {f2}
- sleep, 50
- send, {home}
- sleep, 50
- send, '
- sleep, 50
- send, {enter}
- sleep, 50
- }
- Return
- *^F3::
- loop
- {
- send, {f2}
- sleep, 50
- send, {home}
- sleep, 50
- send, {del}
- sleep, 50
- send, {enter}
- sleep, 50
- }
- Return
- *F5::
- Reload
- Return
- *F6::
- Pause
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement