Sign in to follow this  
Followers 0
Astania

Editing - Script via autov3 re post

6 posts in this topic

#1 ·  Posted (edited)

Edited by Astania

Share this post


Link to post
Share on other sites



Assume $res = 0 thus all those variables within the IF are not defined.

Func levelstat()
    $oFrame = _IEFrameGetCollection($oie, 1)
    $res = _StringBetween(_IEBodyReadHTML($oFrame), "<A href='", "(")
    If $res <> 0 Then
        $jStr = $res[0] & '("v",1,0,0)'
        $jDex = $res[0] & '("v",2,0,0)'
        $jNtl = $res[0] & '("v",3,0,0)'
        $jWis = $res[0] & '("v",4,0,0)'
        $jVit = $res[0] & '("v",5,0,0)'
        $jAll = $res[0] & '("v",6,0,0)'
    EndIf
    Local $levelstat = IniRead($path, "misc", "stat", "wis")
    If $levelstat = "dex" Then
        $levelstat = $jDex
    ElseIf $levelstat = "wis" Then
        $levelstat = $jWis
    ElseIf $levelstat = "ntl" Then
        $levelstat = $jNtl
    ElseIf $levelstat = "str" Then
        $levelstat = $jStr
    ElseIf $levelstat = "vit" Then
        $levelstat = $jVit
    ElseIf $levelstat = "all" Then
        $levelstat = $jAll
    EndIf
    Return $levelstat
EndFunc  ;==>levelstat

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Avoiding the error is easy but what should happen when $res = 0 is something I don't know as I am not going to even try to understand this script.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Maybe you "friend" can help?

I cannot see how we can help without being able to test the script or knowing what it is that is going wrong.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0