Any idea why?
Code: Select all
BarnetsPrsNr()
{
global
Send, {Click 1126, 128}
Sleep, 50
SendInput, ^c
ClipWait, 2
if ErrorLevel
{
MsgBox, There was nothing to copy - Script exit initialized
ExitApp
}
StringMid, Byear, clipboard, 1, 4
StringMid, BMonth, clipboard, 5, 2
StringMid, BDay, clipboard, 7, 2
wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := True
wb.Navigate("https://site.com/index.html")
IELoad(wb)
wb.Document.GetElementByID("bigyear").Value := BYear
wb.Document.GetElementByID("bigmonth").Value := BMonth
wb.Document.GetElementByID("bigday").Value := BDay
return
}
IELoad(wb)
{
global
If !wb ;If wb is not a valid pointer then quit
Return False
Loop ;Otherwise sleep for .1 seconds untill the page starts loading
Sleep,100
Until (wb.busy)
Loop ;Once it starts loading wait until completes
Sleep,100
Until (!wb.busy)
Loop ;optional check to wait for the page to completely load
Sleep,100
Until (wb.Document.Readystate = "Complete")
Return True
}