#include #include #include #include #include #include #include #include #include $oIE = _IECreateEmbedded() $hGUI=GUICreate('Embedded', @DesktopWidth-50, @DesktopHeight-100,10,10) $btSearch = GUICtrlCreateButton('GO', 500, 10, 60, 25) $oIEobj=GUICtrlCreateObj($oIE, 10, 150, @DesktopWidth/2, @DesktopHeight-250) GUISetState() Global $URL='https://sanduskyoh.glyphreports.com' While 1 Local $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $btSearch Select Case StringInStr($URL,'glyphreport') While 1 glyph() WEnd EndSelect EndSwitch Sleep(500) WEnd Func glyph() _IENavigate($oIE, $URL) Sleep(100) Local $oTags = _IETagNameGetCollection($oIE,'input') For $oTag In $oTags $oTag= _IEGetObjById($oIE,'startdatepicker') If Not @error Then $oTag.focus $oTag.value='10/01/2017' EndIf $oTag= _IEGetObjById($oIE,'enddatepicker') If Not @error Then $oTag.focus $oTag.value='10/05/2017' EndIf ;~ If $oTag.GetAttribute('id')="startdatepicker" Then ;~ Sleep(100) ;~ $oTag.focus ;~ _IEFormElementSetValue($oTag, '10/01/2017') ;~ EndIf ;~ If $oTag.GetAttribute('id')="enddatepicker" Then ;~ Sleep(100) ;~ $oTag.focus ;~ _IEFormElementSetValue($oTag, '10/04/2017') ;~ EndIf Next Sleep(100) Local $oTags= _IETagNameGetCollection($oIE,'span') For $oTag in $oTags If $oTag.innerText='Upload Date' Then $oTag.click() EndIf Next Sleep(100) Local $oTags= _IETagNameGetCollection($oIE,'button') For $oTag in $oTags If $oTag.GetAttribute('id')='reportDateTypeSearchButton' Then $oTag.click() EndIf Next Sleep(100000) EndFunc