Forum Discussion
Ryan_Moran
11 years agoValued Contributor
Hi Alexandra,
I seem to recall having similar issues with certain properties because of the way the waitproperty method works. I wrote a function for you that is similar to what I use. Try it and see how this works for you:
I seem to recall having similar issues with certain properties because of the way the waitproperty method works. I wrote a function for you that is similar to what I use. Try it and see how this works for you:
//JScript example
var wshell = new ActiveXObject('WScript.Shell');
var myObject = //your object here
wshell.popup(waitProperty(myObject,'Your property name here','Your property value here',15000));
function waitProperty(object,propName,propValue,timeOut){
timeOut = !timeOut ? 0:timeOut;
var start = new Date().getTime();
Indicator.PushText('Waiting for property value...\nTime remaining: ' + parseInt(timeOut / 1000));
if (object && typeof object == 'object' && aqObject.IsSupported(object,propName)){
if (object[propName] == propValue){
return true;
}
}
timeOut -= (new Date().getTime() - start);
if (timeOut <= 0){
return false;
}
return waitProperty(object,propName,propValue,timeOut);
}
Related Content
- 12 years ago
- 12 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 7 days ago