laffo16 Posted April 17, 2009 Share Posted April 17, 2009 (edited) hey guys, sorry if this a little noobish of me, i know their is alot of documentation about error obj handling. but i thought i'd post my problem anyways, maybe someone with better unstanding can help me. thus far in my script i have been able to avoid any error obj handling with simple IsObj and IsArray use. Local $BAcom = ObjCreate("BettingAssistantCom.Application.ComClass") IsObj($BAcom) returns 1 (all is well) $getBets_obj = $BAcom.getBets() Documentation states getBets() returns an object, however IsObj($getBets_obj) returns 0, but also IsArray($getBets_obj) returns 1. i dont know why IsObj returns 0, as i have to use For $Element In $getBets_obj $getBets[$int][1] = $Element.Selection Next to obtain the data from $getBets_obj, which surely makes it an object? now the problem comes with trying to gather the size of $getBets_obj, here are some example calls depending on number of elements (i know the number of elements because i can set them manualy) ubound($getBets_obj) 0 elements = 1 1 element = 1 2 element = 2 isarray($getBets_obj) 0 elements = 1 1 element = 1 2 element = 1 isobj($getBets_obj) 0 elements = 0 1 element = 0 2 element = 0 applogies for the lengthy post btw, so the problem i have is that i cant detect in ubound() = 1 arrays if the first $Element.Selection exists without bottling out with autoit error. i know i can use Global $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") to detect this error, but im more leaning towards maybe detecting if just $Element.Selection returns an error, as i would rather not have the error handler for my entire program just because i cant get past this wall. if their is a simple solution to this, please dont flame me ^^ Edited April 17, 2009 by laffo16 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now