joffre
13 years agoRegular Contributor
'object.Enabled' doesn't work properly?
I have the following VBScript code:
If the component 'MenuOcorrencias' isn't enabled, my script will delay for 250 ms and try again to find it. The general idea worked. It wasn't enabled so the script tried again, but on Log, it returned an error, saying that
So, how do I avoid this message? I need to wait the object to be available, as the code says.
Thanks.
Set MenuOcorrencias = Aliases.iexplore.pageFpwebFolhaDePagamento2.frameFrame1.formForm1.panelBarra32.panelMenuCache10.textnodeOcorrNcias
Function AguardarMenuOcorrencias
While Not MenuOcorrencias.Enabled
Delay(250)
Wend
End Function
If the component 'MenuOcorrencias' isn't enabled, my script will delay for 250 ms and try again to find it. The general idea worked. It wasn't enabled so the script tried again, but on Log, it returned an error, saying that
.
The object does not exist.
So, how do I avoid this message? I need to wait the object to be available, as the code says.
Thanks.