I am getting a Duplicate function definition error when trying to run my script. I am trying to use the IELoad(wb) function to wait for a page to load, but in my script I am navigating through multiple pages and have to use the same code over and over. Is this something not allowed, is there a way to fix this issue? I can't run the script because of it. Here is the code, I have it in multiple places in the script:
IELoad(wb) ;You need to send the IE handle to the function unless you define it as 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
}
Duplicate function definition error
-
- Posts: 58
- Joined: 09 Jul 2017, 23:44
Re: Duplicate function definition error
Hi
you cannot have the same function several places in your script. The whole point of functions are the write it once use it many times. So you can have many function calls i.e
IELoad(http://www.google.com)
....
IELoad(yahoo.com)
...and so on
All pointing to the same function
you cannot have the same function several places in your script. The whole point of functions are the write it once use it many times. So you can have many function calls i.e
IELoad(http://www.google.com)
....
IELoad(yahoo.com)
...and so on
All pointing to the same function