Every day, four times a day, I have to log in and out of an antiquated website made by ADP to log my hours worked. So I built this AutoHotKey script to do it for me! Caveat: the browser window has to be the same size every time (which is why I used Explorer!). Windows-key + i to log in. Windows-key + o to log out.

 

;
;CLOCK IN to ADP
;
#i::
URL = https://portal.adp.com/public/index.htm

WB := ComObjCreate("InternetExplorer.Application")
WB.Visible := True
WB.Navigate(URL)
While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy ; wait for the page to load
Sleep, 10

wb.document.getElementById("employee").click()
Sleep, 700

Send YOUR USERNAME HERE
Sleep, 300
Send {tab}
Sleep, 300
Send YOUR PASSWORD HERE
Sleep, 300
Send {enter}

While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy ; wait for the page to load
Sleep, 10

Click 133, 110
Sleep, 300
Click 128, 131

While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy ; wait for the page to load
Sleep, 10
Click 83, 371

return

;
;CLOCK OUT of ADP
;
#o::
URL = https://portal.adp.com/public/index.htm

WB := ComObjCreate("InternetExplorer.Application")
WB.Visible := True
WB.Navigate(URL)
While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy ; wait for the page to load
Sleep, 10

wb.document.getElementById("employee").click()
Sleep, 700

Send YOUR USERNAME HERE
Sleep, 300
Send {tab}
Sleep, 300
Send YOUR PASSWORD HERE
Sleep, 300
Send {enter}

While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy ; wait for the page to load
Sleep, 10

Click 133, 110
Sleep, 300
Click 128, 131

While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy ; wait for the page to load
Sleep, 10
Click 203, 373

return

 

Leave a Reply

Your email address will not be published. Required fields are marked *