Code:
#Persistent
SetTimer, SEntry, 250
SetTimer, WWG, 250
SetTimer, Packlist, 250
SetTimer, UPSRemote, 300
return
; The following script automatically dismisses the pointless window asking if packlists printed correctly.
Packlist:
IfWinNotExist, Shipping Entry, Did pack lists print correctly?
return
ControlSend, Button1, {Enter}, Shipping Entry, Did pack lists print correctly?
return
; The following script will automatically reenable Remote Access on the UPS LAN Admin PC.
UPSRemote:
IfWinNotExist, UPS WorldShip - Admin [ Remote Access Disabled ]
return
WinActivate, UPS WorldShip - Admin [ Remote Access Disabled ]
SetKeyDelay, 20, 20
Send {Alt Down}{Alt Up}a{Up}{Enter}
return
; The following script will display a reminder when a shipment is headed to a Grainger branch on the BOL screen.
WWG:
IfWinExist Bill of Lading
SetTitleMatchMode, Slow
IfWinExist, Bill of Lading, W.W. GRAINGER
{
WinWaitClose, Bill of Lading
MsgBox, , Grainger Checklist, I. Two copies of packlist`n a. One on shipment`n b.One in envelope attached to the BOL`nII. Skid placard(s)`n a. Destination placard(s)`n b. "This pallet contains" placards`n if multiple items on same skid`nIII. Load number listed on Bill of Lading`nIV. Billed to Grainger's account
}
return
#^w::
Send Send 3rd Party Billing to:{enter}W.W. Grainger{Enter}PO Box 428{Enter}Skokie, IL 60076
return
#^a::
Send Send 3rd Party Billing to:{enter}Kaivac, Inc. c/o{enter}ACS Traffic Services, Inc.{enter}PO Box 538702{enter}Cincinnati, OH 45253-8702
return
#^s::
#^r::
Send Send 3rd Party Billing to:{enter}SRFTC Brokers{enter}6960 Madison Avenue West{enter}Suite 7{enter}Golden Valley, MN 55427
return
#^u::
Send Universal Logistics{enter}c/o Kaivac, Inc.{Enter}125 Commerce Valley Drive West{enter}Suite 750{enter}Thornhill, ON L3T7W4
return
^!n::
Run notepad
return
^Numpad0::
IfWinNotExist ahk_class Winamp v1.x
Run, Winamp.exe, , Min
ControlSend, ahk_parent, x
return
^Numpad1::
IfWinNotExist ahk_class Winamp v1.x
return
ControlSend, ahk_parent, c
return
^Numpad6::
IfWinNotExist ahk_class Winamp v1.x
return
ControlSend, ahk_parent, b
return
^Numpad4::
IfWinNotExist ahk_class Winamp v1.x
return
ControlSend, ahk_parent, z
return
^Numpad5::
IfWinNotExist ahk_class Winamp v1.x
return
ControlSend, ahk_parent, v
return
^Numpad8::
SoundSet, +10
return
^Numpad2::
SoundSet, -10
return
SEntry2:
Sleep, 1000
Date := A_Now
SetKeyDelay, 20, 20
IfWinNotExist, Shipping Entry
return
WinMove, Shipping Entry, , 260, 270
#SingleInstance
SetTimer, SEntryButtons, 50 ; Changes button names on the message box.
MsgBox, 4099, Order Required in Shipping Entry Screen, Please enter the order number in the Shipping Entry screen first`n(and load it by pressing TAB.) Then select the proper shipping date below.`nMonday applies only if today is Friday.
IfMsgBox, YES
{
Sleep, 75
FormatTime, Date, , ShortDate
ControlSetText, Edit5, %Date%, Shipping Entry ; Enter today's date in VISUAL'S SHIPPED_DATE field
}
IfMsgBox, No
{
Sleep, 75
Date += 1, Days
FormatTime, Date2, %Date%, ShortDate
ControlSetText, Edit5, %Date2%, Shipping Entry ; Enter tomorrow's date in VISUAL'S SHIPPED_DATE field
}
IfMsgBox, CANCEL
{
Sleep, 75
Date += 3, Days
FormatTime, Date3, %Date%, ShortDate
ControlSetText, Edit5, %Date3%, Shipping Entry ; Coming Monday's date entered in VISUAL'S SHIPPED_DATE field
}
return
SEntryButtons: ; Button name change information next 9 lines
IfWinNotExist, Order Required in Shipping Entry Screen
return
SetTimer, SEntryButtons, off
WinActivate
WinMove, 400, 200
ControlSetText, Button1, &Today
ControlSetText, Button2, &Tomorrow
ControlSetText, Button3, &Monday
return
SEntry:
#IfWinActive, Shipping Entry, Status User
KeyWait, Tab, D ; Wait for Tab keypress
Sleep, 250
IfWinExist, Shipping Entry, You will lose changes
{
ControlSend, Button1, {Space}, Shipping Entry, You will lose
WinWaitClose, Shipping Entry, You will lose changes
GoSub, SEntry2
return
}
ControlGetText, Date4, Edit5, Shipping Entry, Status ; Checks SHIPPED_DATE field
IfNotEqual, Date4 ; If not blank, stop. If blank, keep going
return
ControlGetText, Pack, Edit2, Shipping Entry, Status ; Checks PACKLIST_ID field
IfNotEqual, Pack ; If not blank, stop. If blank, keep going
return
ControlGetText, Order, Edit1, Shipping Entry, Status ; Checks ORDER_ID field
IfEqual, Order ; If blank, stop. If not, keep going.
return
GoSub, SEntry2
return
^s::
#IfWinActive ahk_class Gupta:AccFrame
#SingleInstance Force
ControlClick, Button3
Sleep, 250
Send {F11}
WinWaitActive, ahk_class Gupta:Dialog, Print Form
ControlClick, Print Form
ControlFocus, &OK
Send {Enter 2}
return