Jump to content
Sign in to follow this  
MikeTranser

Error scite or script?

Recommended Posts

MikeTranser

What is my probrlem? How to change log in SciTe?

Every one help?

D:\Documents and Settings\Gangsterzy\Pulpit\AutoIT\Projekt\Gotowy na stronke\Allegro\x.au3(439,17) : WARNING: $I: possibly used before declaration.
        _IENavigate($I,
        ~~~~~~~~~~~~~~^
D:\Documents and Settings\Gangsterzy\Pulpit\AutoIT\Projekt\Gotowy na stronke\Allegro\x.au3(454,81) : WARNING: $victim: possibly used before declaration.
                _IENavigate($I, "http://website.pl/victim/" & $victim &
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\Documents and Settings\Gangsterzy\Pulpit\AutoIT\Projekt\Gotowy na stronke\Allegro\x.au3 - 0 error(s), 2 warning(s)
->22:01:33 AU3Check ended.rc:1

Func zaloguj()
    Global $I = _IECreate("http://www.website.pl/", 0, $show)
    $logi = GUICtrlRead($LoginGui)
    $hasl = GUICtrlRead($HasloGui)
    $login = _IETagNameGetCollection($I, "input", 1)
    $haslo = _IETagNameGetCollection($I, "input", 2)
    _IEFormElementSetValue($login, $logi)
    _IEFormElementSetValue($haslo, $hasl)
    $bodyhtml = _IEBodyReadHTML($I)
    $b = StringInStr($bodyhtml, "login")
    $bs = _IETagNameGetCollection($I, "input")
    For $b In $bs
        If $b.src = "login.png" Then _IEAction($b, "click")
    Next
    _IELoadWait($I)
EndFunc   ;==>zaloguj

And

Func pvp()
    If $pvp = 1 Then
        wpadka()
        $linkmin = 25
        $linkmax = 45
;~      $r = 6
        While 1
            $en = energyread()
            If $en >= 91 Then
                _IENavigate($I, ".pl/victim/" & $victim & "/")
                $txt2 = _IEBodyReadHTML($I)
                $y = StringInStr($txt2, "<td>" & $poz & "</td>")
                If $y = 0 Then
                    $victim += 1
                    pvp()
                EndIf
                _IELinkClickByIndex($I, Random($linkmin, $linkmax, 1))
                $txt = _IEBodyReadText($I)
                $y = StringInStr($txt, "Poziom" & $poz)
                If $y <> 0 Then
                    $Form = _IETagNameGetCollection($I, "form", 5)
                    If $dym = 1 Then TrayTip("Bot", "Bije się.", 2)
                    _IEFormSubmit($Form)
                    ExitLoop
                EndIf
            EndIf
            _IENavigate($I, ".pl/victim/")
        WEnd
    EndIf
EndFunc   ;==>pvp
Edited by MikeTranser

Share this post


Link to post
Share on other sites
PsaltyDS

You declared a Global inside a function. SciTE AU3Check has to assume that function might not have run before it was used. If $I is only used inside the function, change it to Local. If you really want $I to be Global, then declare it outside any functions and set the value in functions without re-declaring it.

If you are sure the declaration will be executed before use of the variable (and you want to ignore the poor style without fixing it), you could ignore that warning. Better to fix it properly.

:mellow:

Edit: AU3Check vice SciTE. Good point by Jos.

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Jos

The errors come from Au3check ran by AutoIt3Wrapper before running autoit3.

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

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  

×