DoctorSLO Posted April 12, 2009 Share Posted April 12, 2009 (edited) Hi. I have problems with my script ... When I run it at my computer, everything going well, but when I run on someone other computer with Vista, I got error The error comes from stringregexp : $ie = _IECreate("http://speed.travian.si", 0, 0) $html = _IEBodyReadHTML($ie) $muca = StringRegExp($html, 'class="fm fm110" maxLength=15 value=(\w+) name=(\w+)', 1) $offime = $muca[1] $pw = StringRegExp($html, 'class="fm fm110" type=password maxLength=20 value="" name=(\w+)', 1) $offgeslo = $pw[0] $ime = _IEGetObjByName($ie, $offime) $geslo = _IEGetObjByName($ie, $offgeslo) $prijava = _IEGetObjByName($ie, "s1") In VISTA i got error here that offime is not declared variable ... in XP working fine ... On the post below is complete code Edited April 12, 2009 by DoctorSLO Link to comment Share on other sites More sharing options...
DoctorSLO Posted April 12, 2009 Author Share Posted April 12, 2009 sry for duble post post too long post so here is my code: sry too long .. so I upladed itFarmer_v0.51.au3 Link to comment Share on other sites More sharing options...
Authenticity Posted April 12, 2009 Share Posted April 12, 2009 You don't need to use StringRegExp when using IE.au3 library. You can get almost any type of information using the _IE* functions or the object properties/methods. The problem also is that you're not checking if StringRegExp returns an array variable before using the variable's subscripts which may not exist. If you can post the error as it outputs to the console it may help. Link to comment Share on other sites More sharing options...
oMBRa Posted April 12, 2009 Share Posted April 12, 2009 I get : Subscript used with non-Array variable.: $offime = $muca[1] $offime = $muca^ ERROR 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